XPATH - (Node) Attribute (@)

Card Puncher Data Processing

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:

  • LIST is an node with the name LIST
  • @type refers to the type attribute of an element.
  • @* refers to all the attributes for the current element (here LIST)

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.





Discover More
Card Puncher Data Processing
Xml - Xpath

XPath is a pattern expression used to select a set of XML nodes. You can select: from node name from attributes from text In the XPath specification, the document model defines seven kinds of...



Share this page:
Follow us:
Task Runner