IXMLDOMAttribute
A version of this page is also available for
4/8/2010
Represents an attribute of the IXMLDOMElement. Valid and default values for the attribute are defined in a document type definition (DTD) or schema.
IXMLDOMAttribute inherits IXMLDOMNode but are not actually child nodes of the element and are not considered part of the document tree. Attributes are considered members of their associated elements rather than independent and separate. Thus IXMLDOMAttribute parentNode, previousSibling, and nextSibling members have the value Null.
Methods
The following table shows the methods for IXMLDOMAttribute.
Method | Description |
---|---|
Appends newChild as the last child of this node. |
|
Creates a new node that is an exact clone of this node. |
|
Returns True if this node has children. |
|
Inserts a child node to the left of the specified node or at the end of the list. |
|
Removes the specified child node from the list of children and returns it. |
|
Replaces the specified old child node with the supplied new child node in the set of children of this node, and returns the old child node. |
|
Applies the specified pattern-matching operation to this node's context and returns the list of matching nodes. |
|
Applies the specified pattern-matching operation to this node's context and returns the first matching node. |
|
Processes this node and its children using the supplied Extensible Stylesheet Language Transformations (XSLT) style sheet and returns the resulting transformation. |
|
Processes this node and its children using the supplied XSLT style sheet and returns the resulting transformation in the supplied object. |
Properties
The following table shows the properties for IXMLDOMAttribute.
Property | Description |
---|---|
Contains the list of attributes for this node. Read-only. |
|
Returns the base name for the name qualified with the namespace. Read-only. |
|
Contains a node list containing the children (for nodes that can have children). Read-only. |
|
Specifies the data type for this node. Read/write. |
|
Returns the definition of the node in the document type definition (DTD) or schema. Read-only. |
|
Contains the first child of this node. Read-only. |
|
Returns the last child node. Read-only. |
|
Contains the attribute name. Read-only. |
|
Returns the URI for the namespace. Read-only. |
|
Contains the next sibling of this node in the parent's child list. Read-only. |
|
Contains the qualified name of the element, attribute, or entity reference, or a fixed string for other node types. Read-only. |
|
Specifies the XML Document Object Model (DOM) node type, which determines valid values and whether the node can have child nodes. Read-only. |
|
Contains this node's value, expressed in its defined data type. Read/write. |
|
Returns the node type in string form. Read-only. |
|
Contains the text associated with the node. Read/write. |
|
Returns the root of the document that contains this node. Read-only. |
|
Contains the parent node (for nodes that can have parents). Read-only. |
|
Contains True if this node and all descendants have been parsed and instantiated; False if any nodes remain to be parsed. Read-only. |
|
Returns the namespace prefix. Read-only. |
|
Contains the left sibling of this node. Read-only. |
|
Indicates whether the node (usually an attribute) is explicitly specified or derived from a default value in the DTD or schema. Read-only. |
|
Contains the text content of the node and its subtrees. Read/write. |
|
Contains the attribute value. Read/write. |
|
Contains the XML representation of the node and all its descendants. Read-only. |
* denotes an extension to the World Wide Web Consortium (W3C) DOM.
Events
None.
Remarks
Attribute nodes cannot be the immediate children of IXMLDOMDocumentFragment. However, they can be associated with element nodes that are children of IXMLDOMDocumentFragment node.
The relationship between the value and specified members can be summarized as follows: If the attribute has an assigned value in the document and the specified member is True, the value is the assigned value. If the attribute has no assigned value in the document and has a default value in the DTD, the specified member is False and the value is the default value in the DTD. If the attribute has no assigned value in the document and has a value of #IMPLIED in the DTD, the attribute does not appear in the structure model of the document.
In XML, the value of an attribute is represented by the child nodes of the attribute node because the value can contain entity references. Thus attributes that contain entity references will have a child list containing both text nodes and entity reference nodes. In addition, because the attribute type might be unknown, there are no tokenized attribute values.
Requirements
Header | msxml2.h, msxml2.idl |
Library | uuid.lib |
Windows Embedded CE | Windows CE .NET 4.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |
See Also
Reference
IXMLDOMNode
IXMLDOMElement
IXMLDOMDocumentFragment