[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: xpath question
what is the difference between these xpaths: //table/tgroup/tbody/row[1]/entry[1]/child::node()[1] and //table/tgroup/tbody/row[1]/entry[1]/ce[1] //table/tgroup/tbody/row[1]/entry[1]/para[1] node() matches all kinds of nodes so child::node()[1] which is the same as node()[1] matches the first node which, in your case is a text node consisting of a single newline character. You want *[1] which will select the first element node. (Try to avoid // if you can, it os a very expensive operation) David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ 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
|