cq5 - AEM6. XML import to JCR(Oak) -
during migration site cq5.4 aem6 i've faced problem in importing xml data jcr.
on cq5.4 used "content loader tool"(http(s)://[host]:[port]/crx/loader/index.jsp ) load xml jcr. starting cq5.6.1 tool deprecated , gone. aem6 doesn't have also, same several crx:xml* primary node types(crx:xmlcharacterdata, crx:xmldocument, crx:xmlelement, crx:xmlnode).
i've tried re-import data programmatically, below sample groovy script
importxml(); def importxml(){ fileinputstream inputstream = new fileinputstream("c:/data.xml "); // xml file session.importxml("/content/xmlnode", // destination jcr node inputstream , javax.jcr.importuuidbehavior.import_uuid_create_new); session.save(); }
but import result, lost sibling data. imported data has 1 node on each layer in jcr. reason oak doesn't support same name siblings (sns).
http://docs.adobe.com/docs/en/aem/6-0/deploy/upgrade/introduction-to-oak.html http://jackrabbit.apache.org/oak/docs/differences.html#same_name_siblings
i don't need support sns or crx:xml* node types. i'm happy have unique generated names siblings(i.e. node_1, node_2) , primary node type "nt:unstructured". or other jcr structure, keeps imported data xml.
how import xml data aem6? me out, please.
unfortunately looks ability automatically create unique nodes not exist (jcrutils example has createunique method append numbers conflicting node names). possible use xslt rename each node unique.
Comments
Post a Comment