Subject:using XQuery to keep all data in one XML doc Author:Minollo I. Date:02 Apr 2006 09:52 PM
>So is there a way using XQuery to bring these two xml documents together? If so how?
You can reference the second document using the doc() function, and use XPath to join the two. You can create an XPath expression that does something like...
doc("myOtherDoc.xml")//image[imageid = $imageid]
Or you can join the two documents in the context of a flwor:
for $a in doc("doc1.xml")/a/b, $b in doc("doc2.xml")/c/d)
where $a[someId] = $b[someId]