[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Xpath problem
Hi Kan, > I want to get at the node where the value element is 2111. > ie //Outer[value='2111'] > > But the problem is that it goes to the node that matches just the > first four digits if it exists in the DOM ... so it goes to the node > where value = 21110. So I am not able to specify that it should go > to the first node that exactly matches 2111. In XPath, the path that you've specified should only select the Outer elements whose value element children exactly match '2111'. I suspect, therefore, that you're using Microsoft's "XSL Pattern" syntax, which looks a lot like XPath but isn't. Try using the setProperty() method on the DOMDocument object to state that when you use selectSingleNode(), you are doing so using XPath rather than an XSL Pattern: objXMLDOM.setProperty("SelectionLanguage", "XPath"); objXMLDOM.selectSingleNode("//Outer[value = '2111']"); Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|