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. |
Represents the text content of an element or attribute.
Methods
The following table shows the methods for IXMLDOMText.
Method | Description |
---|---|
Appends newChildas the last child of this node. |
|
Appends the supplied string to the existing string data. |
|
Creates a new node that is an exact clone of this node. |
|
Deletes the specified substring within the string data. |
|
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. |
|
Inserts the supplied string at the specified offset. |
|
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. |
|
Replaces the specified number of characters with the supplied string. |
|
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. |
|
Breaks this text node into two text nodes at the specified offset and inserts the new text node into the tree as a sibling that immediately follows this node. |
|
Retrieves a substring of the full string from the specified range. |
|
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. |
* denotes an extension to the W3C DOM.
Properties
The following table shows the properties for IXMLDOMText.
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. |
|
Contains this node's data, which depends on the node type. Read/write. |
|
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. |
|
Specifies the length, in characters, of the data. Read-only. |
|
Returns the Uniform Resource Identifier (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. |
|
text* |
Contains the text content of the node and its subtrees. Read/write. |
xml* |
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
XML refers to this text content as character data and distinguishes it from markup, the tags that modify that character data. If there is no markup inside an element, that element's text is contained in a single IXMLDOMTextobject that is the child of the element. If there is markup inside an element, it is parsed into child elements that are siblings of the IXMLDOMTextobject(s). The content of the markup elements also appears within text nodes, which are the children of the specific markup element.
When a document is first made available to the XML Document Object Model (DOM), all text is normalized: there is only one text node for each block of text. Users can create adjacent text nodes that represent the contents of a given element without any intervening markup but should be aware that there is no way to represent the separations between these nodes, so they will not persist between XML DOM sessions.
The normalizemethod on the IXMLDOMElementobject merges adjacent text nodes into a single node. You should normalize before starting any operations that depend on a particular document structure to ensure that subsequent sessions will operate on the same structure.
This interface inherits all of the methods, properties, and events of IXMLDOMCharacterData.
Requirements
Header | msxml2.h, msxml2.idl |
Windows Embedded CE | Windows CE .NET 4.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |