yea that won't work, try this
xdmp:document-insert("big.xml",
document { <root>{doc("little1.xml")/*/, doc("little2.xml")/* }</root>} )
The problem here is that even the above won't produce what you probably want.
XML documents must have a single root. You cannot simply concatenate them.
You need to create a new document with a new single root and whatever under it
makes sense ... it *can not* be the same as a concatentation of 2 documents.
In the above example I created a <root> element to wrap the 2 documents ... but
that probably isnt what you want.
If you can describe how the new document would look then we might be able to
help with a better answer.
From: [email protected]
[mailto:[email protected]] On Behalf Of [email protected]
Sent: Thursday, January 30, 2014 10:40 AM
To: [email protected]
Subject: Re: [MarkLogic Dev General] Join multiple XML files as a single XML
file and load it in the database
Dell - Internal Use - Confidential
Hi Mary,
When I try with the below option, then I get the warning "More than one root
element". Please suggest?
Thank You
Regards,
Radha
-----Original Message-----
From:
[email protected]<mailto:[email protected]>
[mailto:[email protected]] On Behalf Of Mary Holstege
Sent: Thursday, January 30, 2014 9:02 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] Join multiple XML files as a single XML
file and load it in the database
On Thu, 30 Jan 2014 07:16:32 -0800, <[email protected]<mailto:[email protected]>>
wrote:
> Dell - Internal Use - Confidential
>
> Hi Team,
>
> I have multiple XML files loaded in Marklogic database, which I need to join
> using XQuery and load it as a single XML file and load back into the
> database. Is there any ways of getting it done?
>
You could do something like this:
xdmp:document-insert("big.xml",
document { doc("little1.xml"), doc("little2.xml") } )
//Mary
_______________________________________________
General mailing list
[email protected]<mailto:[email protected]>
http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general