attributes
Get all attributes from an XML element as a key-value object. Useful for iterating or spreading all attributes. For accessing individual attributes, prefer $input.@name.
element(required): XML UDM element
utlx
// Input: <Product id="P-1" sku="ABC123" category="electronics"/>
// See Chapter 22 for XML attribute access.
{
allAttrs: attributes($input), // {"id": "P-1", "sku": "ABC123", "category": "electronics"}
attrCount: count(keys(attributes($input))) // 3
}