This week's book giveaway is in the Other Open Source APIs forum. We're giving away four copies of Storm Applied and have Sean Allen, Peter Pathirana & Matthew Jankowski on-line! See this thread for details.
Hi, Can we specify the context node from where to start the xmpath search to the XMLNode.selectSingleNode method ?
I tried extracting a specific node & then use that node to invoke the selectSingleNode method, I was expecting that xpath search would happen for tags only within the node on which the selectSingleNode method was invoked , However that does not seem to happen & the xpath search seems to be taking place on the entire xml document.
Xalan provides public static NodeList selectNodeList(Node contextNode, java.lang.String str)
Which gives the functionality i am looking for !. Any suggestions as to how i can make the oracle selectSingleNode behave in a similar manner will be highly appreciated.
I did a Google search for XMLNode.selectSingleNode (it isn't part of the standard Java API and I didn't recognize it). Pretty much all of the links that came back were about that method in the .Net API -- was that what you were asking about? Because the answer in that case is that the node you call the selectSingleNode() method on is the context node for the search.