Table of Contents

XPATH - (Node) Attribute (@)

About

In a template, the expression @type refers to the type attribute of the current node. Similarly, the expression @* refers to all the attributes for the current element.

To refer to an attribute, you prefix the attribute name with an @ sign.

Example:

LIST/@type
LIST/@*   
LIST/attribute::type

where:

Because the expression does not begin with /, the reference specifies a list node relative to the current context-whatever position in the document that happens to be.