Hello,

I¹m trying to do what I think should be pretty simple, but I¹m obviously not
getting something.  I¹m just trying to import a simple XML file via curl and
view the result of the imported structure as JSON.   Steps I followed are
below.  I appreciate any input.

If I do a similar test using a JSON file as the import source I have no
issues.  The structure is imported.

I¹ve had zero luck with XML imports using a variety of test files.

Thanks,

Roger


java -jar org.apache.sling.launchpad-6-standalone.jar

curl -F:operation=import -F:contentType=xml -F:[email protected]
http://admin:admin@localhost:8080/content/test

http://localhost:8080/content/test.json
http://localhost:8080/content/test.tidy.infinity.json

Both return:
{"jcr:primaryType": "nt:unstructured"}

I expected to see the XML structure as JSON, as I thought Sling would import
the XML as nodes.  What am I missing?


Contents of test.xml file:

<?xml version="1.0"?>
<catalog>
   <book id="bk101">
      <author>Gambardella, Matthew</author>
      <title>XML Developer's Guide</title>
      <genre>Computer</genre>
      <price>44.95</price>
      <publish_date>2000-10-01</publish_date>
      <description>An in-depth look at creating applications
      with XML.</description>
   </book>
   <book id="bk112">
      <author>Galos, Mike</author>
      <title>Visual Studio 7: A Comprehensive Guide</title>
      <genre>Computer</genre>
      <price>49.95</price>
      <publish_date>2001-04-16</publish_date>
      <description>Microsoft Visual Studio 7 is explored in depth,
      looking at how Visual Basic, Visual C++, C#, and ASP+ are
      integrated into a comprehensive development
      environment.</description>
   </book>
</catalog>

Reply via email to