You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Lixo Aqui <li...@netcabo.pt> on 2013/06/24 20:09:00 UTC
ImportXML import all child content but the root node
Hi,
I have a repository that has a tree like:/contents/ticket1 (and inside this many folders and content)/contents/ticket2 (and inside this many folders and content)etc...
Now I'm trying to do an export/import functionality. I'm doing an export of:session.exportSystemView("/contents/ticket1" ...)
Now I'm trying to import that file using:session.importXML("/contents/ticket2" ...
My problem is that I get the content in /contents/ticket2/ticket1. Is there any way to import my .xml file but "ignore" the root node, just import recursively its contents?
Thanks in advance, -- cifroes
Re: ImportXML import all child content but the root node
Posted by David Buchmann <da...@liip.ch>.
if i understand correctly, you are sort of trying to use this to copy
one "ticket".
you could implement to make sure /tmp exists and is created, then import
to /tmp and then move all children of /tmp to your target node.
cheers,david
Am 24.06.2013 20:09, schrieb Lixo Aqui:
> Hi,
> I have a repository that has a tree like:/contents/ticket1 (and inside this many folders and content)/contents/ticket2 (and inside this many folders and content)etc...
> Now I'm trying to do an export/import functionality. I'm doing an export of:session.exportSystemView("/contents/ticket1" ...)
> Now I'm trying to import that file using:session.importXML("/contents/ticket2" ...
> My problem is that I get the content in /contents/ticket2/ticket1. Is there any way to import my .xml file but "ignore" the root node, just import recursively its contents?
>
> Thanks in advance, -- cifroes
>
--
Liip AG // Agile Web Development // T +41 26 422 25 11
CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch