With XML_GET_ATTRIBUTE & XML_SET_ATTRIBUTE, one can get or set the value of an XML attribute whose name is already known. However, there is no way to list attribute names. This means that there is no way to read attributes whose names are not already known.
Using these functions, one can systematically process each element in an XML DOM, regardless of whether the schema of the XML is known ahead of time.
The same (or a similar) capability should exist for attributes. In other words, there should be a way to read and set attributes whose names are not known ahead of time.
This idea originates in the discussion XML DOM functions for attributes, where a work-around is documented.