xpath

Questions about XML that are not covered by the other forums should go here.
xpathman
Posts: 4
Joined: Thu Sep 16, 2004 10:26 pm

xpath

Post by xpathman »

Does any one know if Xpath can be used to locate a specific xml element or its attribute and if so reproduce a larger XML fragment (ie including parent nodes and grand parent nodes etc) of which the element is a part of.
thanks for any help
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi,

According with the XPath Specification [1]:
XPath is a language for addressing parts of an XML document, designed to be used by both XSLT and XPointer.

You can use XSLT to accomplish what you described in your post.

[1] http://www.w3.org/TR/xpath

Best Regards,
George
xpathman
Posts: 4
Joined: Thu Sep 16, 2004 10:26 pm

XQuery

Post by xpathman »

Does any one know if XQuery can perform this task on its own?
thanks for any help
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi,

Yes, you can use also XQuery for that.

Best Regards,
George
xpathman
Posts: 4
Joined: Thu Sep 16, 2004 10:26 pm

Post by xpathman »

thanks George
thanks for any help
Post Reply