[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XPath: how to select based on element type?
On Mon, 8 Jan 2001, Sankaranarayanan K V wrote: > Hi, > > I am fairly new to XPath and XML schema. > I have a couple of newbie questions: > > (1) Is there a way a in XPath to select nodes based on their element type? Element type is not a term I recognise. Perhaps you either mean node type or element name. Either way: //comment() (select all comments) //text() (select all text nodes) //* (select all elements) //processing-instruction() (select all PI's) And if you mean element name: //*[name() = 'foo' or name() = 'bar'] Hope that helps. -- <Matt/> /|| ** Director and CTO ** //|| ** AxKit.com Ltd ** ** XML Application Serving ** // || ** http://axkit.org ** ** XSLT, XPathScript, XSP ** // \\| // ** Personal Web Site: http://sergeant.org/ ** \\// //\\ // \\
|
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
|