Attribute nodes
An attribute node represents an XML attribute.
An attribute node can have zero or one parent. The element
node that owns an attribute is considered to be its parent, even though
an attribute node is not a child of its parent element.
An attribute
node has the following node properties:
- node name
- parent
- type name (The type name of an attribute node in DB2® is always xs:untypedAtomic.)
- string value
- typed value
<product xmlns="http://posample.org" pid="100-101-01">
<description>
<name>Snow Shovel, Deluxe 24"</name>
<details>A Deluxe Snow Shovel, 24 inches wide, ergonomic
curved handle with D-Grip</details>
<price>19.99</price>
<weight>2 kg</weight>
</description>
The pid attribute has the following property values:
| Node property | Value | Value type |
| node name | pid | |
| parent | product node | |
| type name | xs:untypedAtomic | |
| string value | "100-101-01" | xs:string |
| typed value | 100-101-01" | xs:untypedAtomic |