Compartilhar via


IXMLDOMCDATASection (Compact 2013)

3/26/2014

Used to quote or escape blocks of text to keep that text from being interpreted as markup language.

Methods

The following table shows the methods for IXMLDOMCDATASection.

Method

Description

appendChild

Appends newChild as the last child of this node.

appendData

Appends the supplied string to the existing string data.

cloneNode

Creates a new node that is an exact clone of this node.

deleteData

Deletes the specified substring within the string data.

hasChildNodes

Returns True if this node has children.

insertBefore

Inserts a child node to the left of the specified node or at the end of the list.

insertData

Inserts the supplied string at the specified offset.

removeChild

Removes the specified child node from the list of children and returns it.

replaceChild

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.

replaceData

Replaces the specified number of characters with the supplied string.

selectNodes*

Applies the specified pattern-matching operation to this node's context and returns the list of matching nodes.

selectSingleNode*

Applies the specified pattern-matching operation to this node's context and returns the first matching node.

splitText

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.

substringData

Retrieves a substring of the full string from the specified range.

transformNode*

Processes this node and its children using the supplied Extensible Stylesheet Language Transformations (XSLT) style sheet and returns the resulting transformation.

transformNodeToObject

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 IXMLDOMCDATASection.

Property

Description

attributes

Contains the list of attributes for this node. Read-only.

baseName*

Returns the base name for the name qualified with the namespace. Read-only.

childNodes

Contains a node list containing the children (for nodes that can have children). Read-only.

data

Contains this node's data, which depends on the node type. Read/write.

dataType*

Specifies the data type for this node. Read/write.

definition*

Returns the definition of the node in the document type definition (DTD) or schema. Read-only.

firstChild

Contains the first child of this node. Read-only.

lastChild

Returns the last child node. Read-only.

length

Specifies the length, in characters, of the data. Read-only.

namespaceURI*

Returns the Uniform Resource Identifier (URI) for the namespace. Read-only.

nextSibling

Contains the next sibling of this node in the parent's child list. Read-only.

nodeName

Contains the qualified name of the element, attribute, or entity reference, or a fixed string for other node types. Read-only.

nodeType

Specifies the XML Document Object Model (DOM) node type, which determines valid values and whether the node can have child nodes. Read-only.

nodeTypedValue*

Contains this node's value, expressed in its defined data type. Read/write.

nodeTypeString*

Returns the node type in string form. Read-only.

nodeValue

Contains the text associated with the node. Read/write.

ownerDocument

Returns the root of the document that contains this node. Read-only.

parentNode

Contains the parent node (for nodes that can have parents). Read-only.

parsed*

Contains True if this node and all descendants have been parsed and instantiated; False if any nodes remain to be parsed. Read-only.

prefix*

Returns the namespace prefix. Read-only.

previousSibling

Contains the left sibling of this node. Read-only.

specified

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

CDATA sections let you include material such as XML fragments within XML documents without needing to escape all the delimiters. The only delimiter reco33gnized in a CDATA section is the "]]>" string that ends the CDATA section.

CDATA sections cannot be nested.

The text contained by the CDATA section is stored in a text node. This text can contain characters that would need to be escaped outside of CDATA sections.

IXMLDOMCDATASection has no unique members of its own, but exposes the same members as the IXMLDOMText object.

Although the IXMLDOMCDATASection inherits IXMLDOMText, unlike text nodes, the normalize method of IXMLDOMElement does not merge CDATASection nodes.

Requirements

Header

msxml2.h,
msxml2.idl

See Also

Reference

XML DOM Objects/Interfaces
IXMLDOMText
normalize Method
IXMLDOMElement