Mega Code Archive
What is Attribute Axis
The attribute axis is used to select the attribute nodes associated with an element node.
If the context node is an element node, the location paths
attribute::* or @*
will each return all the attribute nodes associated with that element node.
To select a specific attribute node named security, you write either
attribute::security
or
@security
@ is an abbreviation for the attribute axis.
If the context node is not an element node, the attribute axis returns an empty node-set.