Expand my Community achievements bar.

SOLVED

Why can't export the whole page conent using Session exportSystemView method

Avatar

Former Community Member
private static void exportSystemView(Session session, Node page) { try { // page at "content/geometrixx/en/services/banking"; File outputFile = new File(page.getName() + ".xml"); FileOutputStream out = new FileOutputStream(outputFile); session.exportSystemView(page.getPath(), out, false, false); } catch (PathNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (RepositoryException e) { // TODO Auto-generated catch block e.printStackTrace(); } }

After run above code, and open the xml file, find no information export with folowing mark part:

[img]service.jpg[/img]

Anyone could know how to deal that?

Thanks in advance.

1 Accepted Solution

Avatar

Correct answer by
Employee

That text is pulled in by reference. If you look at the generated XML, you should see something like this:

<sv:node sv:name="reference"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> <sv:value>nt:unstructured</sv:value> </sv:property> <sv:property sv:name="jcr:created" sv:type="Date"> <sv:value>2011-10-03T15:34:29.604+02:00</sv:value> </sv:property> <sv:property sv:name="jcr:createdBy" sv:type="String"> <sv:value>admin</sv:value> </sv:property> <sv:property sv:name="jcr:lastModified" sv:type="Date"> <sv:value>2011-10-03T15:36:07.429+02:00</sv:value> </sv:property> <sv:property sv:name="jcr:lastModifiedBy" sv:type="String"> <sv:value>admin</sv:value> </sv:property> <sv:property sv:name="path" sv:type="String"> <sv:value> /content/dam/geometrixx/documents/GeoMetrixx_Banking.indd/jcr:content/renditions/page/jcr:content/par/text_u167 </sv:value> </sv:property> <sv:property sv:name="sling:resourceType" sv:type="String"> <sv:value>foundation/components/reference</sv:value> </sv:property> </sv:node>

which corresponds to that block of text.

View solution in original post

3 Replies

Avatar

Correct answer by
Employee

That text is pulled in by reference. If you look at the generated XML, you should see something like this:

<sv:node sv:name="reference"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> <sv:value>nt:unstructured</sv:value> </sv:property> <sv:property sv:name="jcr:created" sv:type="Date"> <sv:value>2011-10-03T15:34:29.604+02:00</sv:value> </sv:property> <sv:property sv:name="jcr:createdBy" sv:type="String"> <sv:value>admin</sv:value> </sv:property> <sv:property sv:name="jcr:lastModified" sv:type="Date"> <sv:value>2011-10-03T15:36:07.429+02:00</sv:value> </sv:property> <sv:property sv:name="jcr:lastModifiedBy" sv:type="String"> <sv:value>admin</sv:value> </sv:property> <sv:property sv:name="path" sv:type="String"> <sv:value> /content/dam/geometrixx/documents/GeoMetrixx_Banking.indd/jcr:content/renditions/page/jcr:content/par/text_u167 </sv:value> </sv:property> <sv:property sv:name="sling:resourceType" sv:type="String"> <sv:value>foundation/components/reference</sv:value> </sv:property> </sv:node>

which corresponds to that block of text.

Avatar

Former Community Member

Hi justin,  thanks for your reply and i find the same reference part in the generated xml at my computer.

But is there any way to get that block of text with JCR API? Because i need to get the text then send to another server to translate.

Avatar

Employee

Sure, you can get an export of /content/dam/geometrixx/documents/GeoMetrixx_Banking.indd/jcr:content/renditions/page/jcr:content/par/text_u167