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.

WYSIWYG XSLT Designer

Stylus Studio's powerful and easy-to-use WYSIWYG ("What you see is what you get") XSLT Designer lets you create XSLT stylesheets without writing any code! Go from a blank slate to solid, robust XSLT in minutes, using simple drag-and-drop operations.

Advertising & Marketing

Learn about top advertising and marketing companies that are leveraging Stylus Studio 2006 to enhance their everyday work experience.

XML Schema-Aware Queries and Stylesheets

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

Canonicalize XML

Stylus Studio® features a handy XML canonicalizer among its many XML editing utilities, for quickly and easily converting any XML document into its canonical form (c14n), a widely-used W3C standard for normalizing XML files.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member