IMXAttributes Interface


The IMXAttributes interface complements the implementation of the ISAXAttributes interface, which can be used to query attribute collections. Beyond the ability to query existing attribute collections using ISAXAttributes, the IMXAttributes interface allows you to create and edit attribute collections.

The implemented CoClass for ISAXAttributes and IMXAttributes are version-dependent. For more information on the version-specific ProgIDs and GUIDs for these CoClasses in MSXML 3.0 and later, see GUIDs and ProgID Information.


CoClasses define a class to the Component Object Model (COM). The CoClass definitions include a list of interfaces supported by COM objects created from this class.

The implementation of the IMXAttributes interface returns only the list of attributes data stored inside of an attribute's collection object. Because the ISAXAttributes implementation cannot be sure which implementation is provided, it cannot be sure of the validity of attributes. The requirements of different applications may be different. For this reason, the implementation of the CoClass does not enforce any assumption about input information, accepting it whenever possible.

The two uses for this interface are:

  • To take a persistent snapshot of an attribute.

  • To construct or modify an attribute's collection object in a Simple API for XML (SAX2) driver or filter.


addAttribute Adds an attribute to the end of the attribute collection.
addAttributeFromIndex Adds an attribute, whose value is equal to the indexed attribute in the input attributes object, to the end of the list.
clear Clears the attribute list for reuse.
removeAttribute Removes an attribute from the list.
setAttribute Sets an attribute in the list.
setAttributes Copies all existing attributes of a collection to a specified object.
setLocalName Sets the local name of a specific attribute.
setQName Sets the qualified name (QName) of a specific attribute.
setType Sets the type of a specific attribute.
setURI Sets the namespace URI of a specific attribute.
setValue Sets the value of a specific attribute.


Implementation: msxml3.dll, msxml6.lib

Header and LIB files: msxml2.h, msxml2.lib, msxml6.h, msxml6.lib


Implemented in: MSXML 3.0, MSXML 6.0