XmlCDataSection XmlCDataSection XmlCDataSection XmlCDataSection Class

Represents a CDATA section of an XML document.

Syntax

Declaration

public sealed class XmlCDataSectionpublic sealed class XmlCDataSectionPublic NotInheritable Class XmlCDataSection

Properties summary

Gets the list of attributes of this node.

Gets a list of children in the current node. This property always returns NULL.

Gets or sets the node data depending on the node type.

Gets the first child node. This property always returns NULL.

Gets the text from inside the XML.

Gets the last child node. This property always returns NULL because the CDataSection does not have children.

Gets the length of the data, in Unicode characters.

Gets the local name, which is the local part of a qualified name. This is called the local part in Namespaces in XML.

Returns the Uniform Resource Identifier (URI) for the namespace.

Gets the next sibling of the node in the parent's child list.

Returns the qualified name for attribute, document type, element, entity, or notation nodes. Returns a fixed string for all other node types.

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

Gets or sets the text associated with the node.

Returns the root of the document that contains the node.

Gets the parent node of the node instance.

Gets or sets the namespace prefix.

Gets the previous sibling of the node in the parent's child list.

Methods summary

This method is not applicable to this class. The CDataSection does not have children. This method will throw an exception.

Appends the supplied string to the existing string data.

Clones a new node.

Deletes specified data.

Returns the XML representation of the node and all its descendants.

Determines whether a node has children. The CDataSection does not have children. This method always returns false.

Inserts a child node to the left of the specified node, or at the end of the child node list. This method is not applicable to this class and will throw an exception.

Inserts a string at the specified offset.

Normalizes all descendant elements by combining two or more adjacent text nodes into one unified text node.

Removes the specified child node from the list of children and returns it. This method is not applicable to this class as the CDataSection does not have children. This method will throw an exception.

Replaces the specified old child node with the supplied new child node. This method is not applicable to this class as the CDataSection does not have children. This method will throw an exception.

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 as an XmlNodeList. This method is not applicable to this class and will throw an exception.

Applies the specified pattern-matching operation to this node's context and returns the list of matching nodes as an XmlNodeList. This method is not applicable to this class and will throw an exception.

Applies the specified pattern-matching operation to this node's context and returns the first matching node. This method is not applicable to this class and will throw an exception.

Applies the specified pattern-matching operation to this node's context and returns the first matching node. This method is not applicable to this class and will throw an exception.

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

Properties

  • Attributes
    Attributes
    Attributes
    Attributes

    Gets the list of attributes of this node.

    public XmlNamedNodeMap Attributes { get; }public XmlNamedNodeMap Attributes { get; }Public ReadOnly Property Attributes As XmlNamedNodeMap

    Property Value

  • ChildNodes
    ChildNodes
    ChildNodes
    ChildNodes

    Gets a list of children in the current node. This property always returns NULL.

    public XmlNodeList ChildNodes { get; }public XmlNodeList ChildNodes { get; }Public ReadOnly Property ChildNodes As XmlNodeList

    Property Value

  • Data
    Data
    Data
    Data

    Gets or sets the node data depending on the node type.

    public string Data { get; set; }public string Data { get; set; }Public ReadWrite Property Data As string

    Property Value

    • string
      string
      string
      string

      The node data.

  • FirstChild
    FirstChild
    FirstChild
    FirstChild

    Gets the first child node. This property always returns NULL.

    public IXmlNode FirstChild { get; }public IXmlNode FirstChild { get; }Public ReadOnly Property FirstChild As IXmlNode

    Property Value

  • InnerText
    InnerText
    InnerText
    InnerText

    Gets the text from inside the XML.

    public string InnerText { get; set; }public string InnerText { get; set; }Public ReadWrite Property InnerText As string

    Property Value

    • string
      string
      string
      string

      The text from inside the XML. Returns an empty string if there is no text.

  • LastChild
    LastChild
    LastChild
    LastChild

    Gets the last child node. This property always returns NULL because the CDataSection does not have children.

    public IXmlNode LastChild { get; }public IXmlNode LastChild { get; }Public ReadOnly Property LastChild As IXmlNode

    Property Value

  • Length
    Length
    Length
    Length

    Gets the length of the data, in Unicode characters.

    public uint Length { get; }public uint Length { get; }Public ReadOnly Property Length As uint

    Property Value

    • uint
      uint
      uint
      uint

      The length of the data, in Unicode characters.

  • LocalName
    LocalName
    LocalName
    LocalName

    Gets the local name, which is the local part of a qualified name. This is called the local part in Namespaces in XML.

    public object LocalName { get; }public object LocalName { get; }Public ReadOnly Property LocalName As object

    Property Value

    • object
      object
      object
      object

      The local name.

  • NamespaceUri
    NamespaceUri
    NamespaceUri
    NamespaceUri

    Returns the Uniform Resource Identifier (URI) for the namespace.

    public object NamespaceUri { get; }public object NamespaceUri { get; }Public ReadOnly Property NamespaceUri As object

    Property Value

    • object
      object
      object
      object

      The Uri for the namespace. This refers to the "uuu" portion of the namespace declaration xmlns:nnn="uuu".

  • NextSibling
    NextSibling
    NextSibling
    NextSibling

    Gets the next sibling of the node in the parent's child list.

    public IXmlNode NextSibling { get; }public IXmlNode NextSibling { get; }Public ReadOnly Property NextSibling As IXmlNode

    Property Value

  • NodeName
    NodeName
    NodeName
    NodeName

    Returns the qualified name for attribute, document type, element, entity, or notation nodes. Returns a fixed string for all other node types.

    public string NodeName { get; }public string NodeName { get; }Public ReadOnly Property NodeName As string

    Property Value

    • string
      string
      string
      string

      The qualified node name, which varies depending on the node type.

  • NodeType
    NodeType
    NodeType
    NodeType

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

    public NodeType NodeType { get; }public NodeType NodeType { get; }Public ReadOnly Property NodeType As NodeType

    Property Value

  • NodeValue
    NodeValue
    NodeValue
    NodeValue

    Gets or sets the text associated with the node.

    public object NodeValue { get; set; }public object NodeValue { get; set; }Public ReadWrite Property NodeValue As object

    Property Value

    • object
      object
      object
      object

      The text associated with the node.

  • OwnerDocument
    OwnerDocument
    OwnerDocument
    OwnerDocument

    Returns the root of the document that contains the node.

    public XmlDocument OwnerDocument { get; }public XmlDocument OwnerDocument { get; }Public ReadOnly Property OwnerDocument As XmlDocument

    Property Value

  • ParentNode
    ParentNode
    ParentNode
    ParentNode

    Gets the parent node of the node instance.

    public IXmlNode ParentNode { get; }public IXmlNode ParentNode { get; }Public ReadOnly Property ParentNode As IXmlNode

    Property Value

  • Prefix
    Prefix
    Prefix
    Prefix

    Gets or sets the namespace prefix.

    public object Prefix { get; set; }public object Prefix { get; set; }Public ReadWrite Property Prefix As object

    Property Value

    • object
      object
      object
      object

      The namespace prefix specified on the element, attribute, or entity reference. For example, for the element <xxx:yyy>, this property returns xxx. It returns an empty string, "", if no prefix is specified.

  • PreviousSibling
    PreviousSibling
    PreviousSibling
    PreviousSibling

    Gets the previous sibling of the node in the parent's child list.

    public IXmlNode PreviousSibling { get; }public IXmlNode PreviousSibling { get; }Public ReadOnly Property PreviousSibling As IXmlNode

    Property Value

Methods

  • AppendChild(Windows.Data.Xml.Dom.IXmlNode)
    AppendChild(Windows.Data.Xml.Dom.IXmlNode)
    AppendChild(Windows.Data.Xml.Dom.IXmlNode)
    AppendChild(Windows.Data.Xml.Dom.IXmlNode)

    This method is not applicable to this class. The CDataSection does not have children. This method will throw an exception.

    public IXmlNode AppendChild(Windows.Data.Xml.Dom.IXmlNode newChild)public IXmlNode AppendChild(Windows.Data.Xml.Dom.IXmlNode newChild)Public Function AppendChild(newChild As Windows.Data.Xml.Dom.IXmlNode) As IXmlNode

    Parameters

    Returns

  • AppendData(System.String)
    AppendData(System.String)
    AppendData(System.String)
    AppendData(System.String)

    Appends the supplied string to the existing string data.

    public void AppendData(System.String data)public void AppendData(System.String data)Public Function AppendData(data As System.String) As void

    Parameters

    • data
      System.String
      System.String
      System.String
      System.String

      The data to be appended to the existing string.

  • CloneNode(System.Boolean)
    CloneNode(System.Boolean)
    CloneNode(System.Boolean)
    CloneNode(System.Boolean)

    Clones a new node.

    public IXmlNode CloneNode(System.Boolean deep)public IXmlNode CloneNode(System.Boolean deep)Public Function CloneNode(deep As System.Boolean) As IXmlNode

    Parameters

    • deep
      System.Boolean
      System.Boolean
      System.Boolean
      System.Boolean

      A flag that indicates whether to recursively clone all nodes that are descendants of this node. If true, this method creates a clone of the complete tree below this node. If false, this method clones this node and its attributes only.

    Returns

  • DeleteData(System.UInt32,System.UInt32)
    DeleteData(System.UInt32,System.UInt32)
    DeleteData(System.UInt32,System.UInt32)
    DeleteData(System.UInt32,System.UInt32)

    Deletes specified data.

    public void DeleteData(System.UInt32 offset,System.UInt32 count)public void DeleteData(System.UInt32 offset,System.UInt32 count)Public Function DeleteData(offset As System.UInt32,count As System.UInt32) As void

    Parameters

    • offset
      System.UInt32
      System.UInt32
      System.UInt32
      System.UInt32

      The offset, in characters, at which to start deleting the string data.

    • count
      System.UInt32
      System.UInt32
      System.UInt32
      System.UInt32

      The number of characters to delete.

  • GetXml()
    GetXml()
    GetXml()
    GetXml()

    Returns the XML representation of the node and all its descendants.

    public string GetXml()public string GetXml()Public Function GetXml() As string

    Returns

    • string
      string
      string
      string

      The XML representation of the node and all its descendants.

  • HasChildNodes()
    HasChildNodes()
    HasChildNodes()
    HasChildNodes()

    Determines whether a node has children. The CDataSection does not have children. This method always returns false.

    public bool HasChildNodes()public bool HasChildNodes()Public Function HasChildNodes() As bool

    Returns

    • bool
      bool
      bool
      bool

      True if this node has children; otherwise false. This method always returns false.

  • InsertBefore(Windows.Data.Xml.Dom.IXmlNode,Windows.Data.Xml.Dom.IXmlNode)
    InsertBefore(Windows.Data.Xml.Dom.IXmlNode,Windows.Data.Xml.Dom.IXmlNode)
    InsertBefore(Windows.Data.Xml.Dom.IXmlNode,Windows.Data.Xml.Dom.IXmlNode)
    InsertBefore(Windows.Data.Xml.Dom.IXmlNode,Windows.Data.Xml.Dom.IXmlNode)

    Inserts a child node to the left of the specified node, or at the end of the child node list. This method is not applicable to this class and will throw an exception.

    public IXmlNode InsertBefore(Windows.Data.Xml.Dom.IXmlNode newChild,Windows.Data.Xml.Dom.IXmlNode referenceChild)public IXmlNode InsertBefore(Windows.Data.Xml.Dom.IXmlNode newChild,Windows.Data.Xml.Dom.IXmlNode referenceChild)Public Function InsertBefore(newChild As Windows.Data.Xml.Dom.IXmlNode,referenceChild As Windows.Data.Xml.Dom.IXmlNode) As IXmlNode

    Parameters

    • newChild

      The address of the new node to be inserted. The node passed here must be a valid child of the current XML DOM document node. For example, if the current node is an attribute, you cannot pass another attribute in the newChild parameter, because an attribute cannot have an attribute as a child. If newChild is a DOCUMENT_FRAGMENT node type, all its children are inserted in order before referenceChild.

      If newChild is already in the tree, it is first removed before it is reinserted before the referenceChild node. Read-only nodes, such as NODE_DOCUMENT_TYPE and NODE_ENTITY nodes, cannot be passed in the newChild parameter.

    • referenceChild

      The reference node. The node specified is where the newChild node is to be inserted to the left as the preceding sibling in the child list. The node passed here must be a either a child node of the current node or null. If the value is null, the newChild node is inserted at the end of the child list. If the referenceChild node is not a child of the current node, an error is returned.

    Returns

  • InsertData(System.UInt32,System.String)
    InsertData(System.UInt32,System.String)
    InsertData(System.UInt32,System.String)
    InsertData(System.UInt32,System.String)

    Inserts a string at the specified offset.

    public void InsertData(System.UInt32 offset,System.String data)public void InsertData(System.UInt32 offset,System.String data)Public Function InsertData(offset As System.UInt32,data As System.String) As void

    Parameters

    • offset
      System.UInt32
      System.UInt32
      System.UInt32
      System.UInt32

      The offset, in characters, at which to insert the supplied string data.

    • data
      System.String
      System.String
      System.String
      System.String

      The data to be inserted into the existing string.

  • Normalize()
    Normalize()
    Normalize()
    Normalize()

    Normalizes all descendant elements by combining two or more adjacent text nodes into one unified text node.

    public void Normalize()public void Normalize()Public Function Normalize() As void
  • RemoveChild(Windows.Data.Xml.Dom.IXmlNode)
    RemoveChild(Windows.Data.Xml.Dom.IXmlNode)
    RemoveChild(Windows.Data.Xml.Dom.IXmlNode)
    RemoveChild(Windows.Data.Xml.Dom.IXmlNode)

    Removes the specified child node from the list of children and returns it. This method is not applicable to this class as the CDataSection does not have children. This method will throw an exception.

    public IXmlNode RemoveChild(Windows.Data.Xml.Dom.IXmlNode childNode)public IXmlNode RemoveChild(Windows.Data.Xml.Dom.IXmlNode childNode)Public Function RemoveChild(childNode As Windows.Data.Xml.Dom.IXmlNode) As IXmlNode

    Parameters

    Returns

  • ReplaceChild(Windows.Data.Xml.Dom.IXmlNode,Windows.Data.Xml.Dom.IXmlNode)
    ReplaceChild(Windows.Data.Xml.Dom.IXmlNode,Windows.Data.Xml.Dom.IXmlNode)
    ReplaceChild(Windows.Data.Xml.Dom.IXmlNode,Windows.Data.Xml.Dom.IXmlNode)
    ReplaceChild(Windows.Data.Xml.Dom.IXmlNode,Windows.Data.Xml.Dom.IXmlNode)

    Replaces the specified old child node with the supplied new child node. This method is not applicable to this class as the CDataSection does not have children. This method will throw an exception.

    public IXmlNode ReplaceChild(Windows.Data.Xml.Dom.IXmlNode newChild,Windows.Data.Xml.Dom.IXmlNode referenceChild)public IXmlNode ReplaceChild(Windows.Data.Xml.Dom.IXmlNode newChild,Windows.Data.Xml.Dom.IXmlNode referenceChild)Public Function ReplaceChild(newChild As Windows.Data.Xml.Dom.IXmlNode,referenceChild As Windows.Data.Xml.Dom.IXmlNode) As IXmlNode

    Parameters

    Returns

  • ReplaceData(System.UInt32,System.UInt32,System.String)
    ReplaceData(System.UInt32,System.UInt32,System.String)
    ReplaceData(System.UInt32,System.UInt32,System.String)
    ReplaceData(System.UInt32,System.UInt32,System.String)

    Replaces the specified number of characters with the supplied string.

    public void ReplaceData(System.UInt32 offset,System.UInt32 count,System.String data)public void ReplaceData(System.UInt32 offset,System.UInt32 count,System.String data)Public Function ReplaceData(offset As System.UInt32,count As System.UInt32,data As System.String) As void

    Parameters

    • offset
      System.UInt32
      System.UInt32
      System.UInt32
      System.UInt32

      The offset, in characters, at which to start replacing string data.

    • count
      System.UInt32
      System.UInt32
      System.UInt32
      System.UInt32

      The number of characters to replace.

    • data
      System.String
      System.String
      System.String
      System.String

      The new data that replaces the old string data.

  • SelectNodes(System.String)
    SelectNodes(System.String)
    SelectNodes(System.String)
    SelectNodes(System.String)

    Applies the specified pattern-matching operation to this node's context and returns the list of matching nodes as an XmlNodeList. This method is not applicable to this class and will throw an exception.

    public XmlNodeList SelectNodes(System.String xpath)public XmlNodeList SelectNodes(System.String xpath)Public Function SelectNodes(xpath As System.String) As XmlNodeList

    Parameters

    • xpath
      System.String
      System.String
      System.String
      System.String

      Specifies an XPath expression.

    Returns

  • SelectNodesNS(System.String,System.Object)
    SelectNodesNS(System.String,System.Object)
    SelectNodesNS(System.String,System.Object)
    SelectNodesNS(System.String,System.Object)

    Applies the specified pattern-matching operation to this node's context and returns the list of matching nodes as an XmlNodeList. This method is not applicable to this class and will throw an exception.

    public XmlNodeList SelectNodesNS(System.String xpath,System.Object namespaces)public XmlNodeList SelectNodesNS(System.String xpath,System.Object namespaces)Public Function SelectNodesNS(xpath As System.String,namespaces As System.Object) As XmlNodeList

    Parameters

    • xpath
      System.String
      System.String
      System.String
      System.String

      Specifies an XPath expresssion.

    • namespaces
      System.Object
      System.Object
      System.Object
      System.Object

      Contains a string that specifies namespaces for use in XPath expressions when it is necessary to define new namespaces externally. Namespaces are defined in the XML style, as a space-separated list of namespace declaration attributes. You can use this property to set the default namespace as well.

    Returns

    Remarks

    Prefixes in the query are resolved using the specified namespace declarations.

  • SelectSingleNode(System.String)
    SelectSingleNode(System.String)
    SelectSingleNode(System.String)
    SelectSingleNode(System.String)

    Applies the specified pattern-matching operation to this node's context and returns the first matching node. This method is not applicable to this class and will throw an exception.

    public IXmlNode SelectSingleNode(System.String xpath)public IXmlNode SelectSingleNode(System.String xpath)Public Function SelectSingleNode(xpath As System.String) As IXmlNode

    Parameters

    • xpath
      System.String
      System.String
      System.String
      System.String

      Specifies an XPath expression.

    Returns

    • The first node that matches the given pattern-matching operation. If no nodes match the expression, the method returns a null value.

  • SelectSingleNodeNS(System.String,System.Object)
    SelectSingleNodeNS(System.String,System.Object)
    SelectSingleNodeNS(System.String,System.Object)
    SelectSingleNodeNS(System.String,System.Object)

    Applies the specified pattern-matching operation to this node's context and returns the first matching node. This method is not applicable to this class and will throw an exception.

    public IXmlNode SelectSingleNodeNS(System.String xpath,System.Object namespaces)public IXmlNode SelectSingleNodeNS(System.String xpath,System.Object namespaces)Public Function SelectSingleNodeNS(xpath As System.String,namespaces As System.Object) As IXmlNode

    Parameters

    • xpath
      System.String
      System.String
      System.String
      System.String

      Specifies an XPath expression.

    • namespaces
      System.Object
      System.Object
      System.Object
      System.Object

      Contains a string that specifies the namespaces to use in XPath expressions when it is necessary to define new namespaces externally. Namespaces are defined in the XML style, as a space-separated list of namespace declaration attributes. You can use this property to set the default namespace as well.

    Returns

    • The first node that matches the given pattern-matching operation. If no nodes match the expression, this method returns a null value.

    Remarks

    Prefixes in the query are resolved using the specified namespace declarations.

  • SplitText(System.UInt32)
    SplitText(System.UInt32)
    SplitText(System.UInt32)
    SplitText(System.UInt32)

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

    public IXmlText SplitText(System.UInt32 offset)public IXmlText SplitText(System.UInt32 offset)Public Function SplitText(offset As System.UInt32) As IXmlText

    Parameters

    • offset
      System.UInt32
      System.UInt32
      System.UInt32
      System.UInt32

      The number of characters at which to split this text node into two nodes, starting from zero.

    Returns

  • SubstringData(System.UInt32,System.UInt32)
    SubstringData(System.UInt32,System.UInt32)
    SubstringData(System.UInt32,System.UInt32)
    SubstringData(System.UInt32,System.UInt32)

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

    public string SubstringData(System.UInt32 offset,System.UInt32 count)public string SubstringData(System.UInt32 offset,System.UInt32 count)Public Function SubstringData(offset As System.UInt32,count As System.UInt32) As string

    Parameters

    • offset
      System.UInt32
      System.UInt32
      System.UInt32
      System.UInt32

      Specifies the offset, in characters, from the beginning of the string. An offset of zero indicates copying from the start of the data.

    • count
      System.UInt32
      System.UInt32
      System.UInt32
      System.UInt32

      Specifies the number of characters to retrieve from the specified offset.

    Returns

    • string
      string
      string
      string

      The returned substring.

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.ContractVersionAttribute

Details

Assembly

Windows.Data.Xml.Dom.dll