Obtaining the Name of a Node

The name() function returns a string that contains the tag name of the node, including the namespace prefix, if any.

The following query returns the name of the third element in bookstore, which is "magazine".

name(/bookstore/*[3])
               

            

Wildcards

An asterisk ( * ) specifies a wildcard name for element names. If there are comments before the third element in the preceding example, this query does not include them in the count. See Filtering Results of Queries.

Note

 

Remember, an asterisk that is not preceded by an at sign (@) never returns attributes. The XPath processor does not include attributes in node counts. See Attributes and Wildcards.

XQuery Tutorial

This XQuery Tutorial is about "BUILDING XQUERY BASED WEB SERVICE AGGREGATION AND REPORTING APPLICATIONS".

XML Schema-Aware Queries and Stylesheets

Learn how to simplify XSLT and XQuery applications using Schema Aware XSLT and XQuery processing technologies.

Java Code Generation

The Stylus Studio Java Codce Generator lets you generate deployable Java code for XQuery and XSLT at the push of a button!

XML Schema Tutorial

An XML Schema Tutorial that explores real-world XML Schema development issues, XML Schema examples and various use cases.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member