DominicWatson Posted July 11, 2007 Share Posted July 11, 2007 Is it possible to create an XPath expression to filter the child nodes that get returned with each node result? For example: say I have a node that looks like this (in xml): <element id="1"> <name>blah</name> <description>blah blah</description> <other>blah</other> <other>blah1</other> <other>blah2</other></element> I'd like an XPath expression to return a node result like this (the 'filter' saying I only want the 'name' child included): <element id="1"> <name>blah</name></element> Can it be done?!Thanks in advance,Dom Link to comment Share on other sites More sharing options...
boen_robot Posted July 11, 2007 Share Posted July 11, 2007 No. Not in XPath 1.0 anyway. XPath 2.0 and XQuery allow that. I'm not (yet) sure how it's done in either though, but I'm sure they allow it, considering XQuery is almost as powerful as XSLT. Link to comment Share on other sites More sharing options...
DominicWatson Posted July 11, 2007 Author Share Posted July 11, 2007 No. Not in XPath 1.0 anyway. XPath 2.0 and XQuery allow that. I'm not (yet) sure how it's done in either though, but I'm sure they allow it, considering XQuery is almost as powerful as XSLT.Yeh, figured not. Nevermind :)Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.