[Home] [By Thread] [By Date] [Recent Entries]

  • From: Matt Sergeant <matt@s...>
  • To: Sankaranarayanan K V <sankar@m...>
  • Date: Mon, 08 Jan 2001 10:33:26 +0000 (GMT)

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/     **
     \\//
     //\\
    //  \\


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member