Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XQuery - Maintaining Document Structure

Status
Not open for further replies.

TheVillageIdiot27

Programmer
Nov 10, 2005
58
GB
I have an XML Document which apes the replicates the file/folder structure on one of our servers so that a folder node can exist within a folder node and a file node can exist at any depth.

My file nodes have there own custom nodes added to them which I am trying to query although this is my first tim using XQuery and I am having a problem.

At the moment I can't the right way of maintaining the structure.

After executing the query

'/rootlevel//file[@extension='doc']'

And copying the selected nodes results to a new document everying is at the root level whereas I want to keep the original parent nodes.

Can anyone point me in the right direction?



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top