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 » Thu Sep 16, 2004 10:32 pm

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: 2101
Joined: Thu Jan 09, 2003 2:58 pm

Post by george » Thu Sep 16, 2004 11:14 pm

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 » Fri Sep 24, 2004 10:16 pm

Does any one know if XQuery can perform this task on its own?
thanks for any help

george
Site Admin
Posts: 2101
Joined: Thu Jan 09, 2003 2:58 pm

Post by george » Tue Sep 28, 2004 11:36 am

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 » Mon Oct 04, 2004 3:57 pm

thanks George
thanks for any help

Post Reply