Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

Contains the list of attributes for this node.

Script Syntax

Copy Code
var objXMLDOMNamedNodeMap = oXMLDOMNode.attributes;

Remarks

Script Parameters

None.

Script Return Value

C/C++ Syntax

Copy Code
HRESULT get_attributes(
  IXMLDOMNamedNodeMap** 
attributeMap
);

Remarks

C/C++ Parameters

attributeMap

[out, retval] IXMLDOMNamedNodeMapreturned for nodes that can return attributes ( Element, Entity, and Notationnodes). Returns Null for all other node types. For the valid node types, the NamedNodeMapis always returned; when there are no attributes on the element, the list length is set to zero.

C/C++ Return Values

S_OK

Success. Returns a non-null pointer value.

S_FALSE

Value returned if the node type does not allow attributes.

E_INVALIDARG

Value returned if attributeMapis Null.

Requirements

Header msxml2.h, msxml2.idl
Windows Embedded CE Windows CE .NET 4.0 and later

General Remarks

This value depends on the value of the nodeTypeproperty.

Value Description

NODE_ATTRIBUTE

NODE_CDATA_SECTION

NODE_COMMENT

NODE_DOCUMENT

NODE_DOCUMENT_FRAGMENT

NODE_ENTITY_REFERENCE

NODE_TEXT

Always returns Null.

NODE_ELEMENT

Returns IXMLDOMNamedNodeMapthat contains a list of nodes corresponding to the attributes of the element.

NODE_PROCESSING_INSTRUCTION

Returns null for all processing instructions except the XML declaration, for example, <?xml version="1.0" encoding="windows-1252" standalone="yes" ?>.

For the XML declaration, the version, encoding, and standalone specifications can be accessed as attributes from the corresponding node.

NODE_DOCUMENT_TYPE

Values specified in the <!DOCTYPE ...> can be accessed as attributes from the node corresponding to the document type declaration. The names are "SYSTEM" and "PUBLIC". They are uppercase.

NODE_ENTITY

NODE_NOTATION

Returns IXMLDOMNamedNodeMapthat exposes the PUBLIC ID, SYSTEM ID, and NDATA as attributes.

This property is read-only, and applies to the following objects and interfaces:

IXMLDOMAttribute, IXMLDOMCDATASection, IXMLDOMCharacterData, IXMLDOMComment, DOMDocument, IXMLDOMDocumentFragment, IXMLDOMDocumentType, IXMLDOMElement, IXMLDOMEntity, IXMLDOMEntityReference, IXMLDOMNamedNodeMap, IXMLDOMNode, IXMLDOMNotation, IXMLDOMProcessingInstruction, IXMLDOMText, and IXTLRuntime.

See Also