XmlElement XmlElement XmlElement XmlElement XmlElement Class

Definition

Encapsulates information specific to XML Element nodes.

public : sealed class XmlElement : IXmlElement, IXmlNode, IXmlNodeSelector, IXmlNodeSerializer
struct winrt::Windows::Data::Xml::Dom::XmlElement : IXmlElement, IXmlNode, IXmlNodeSelector, IXmlNodeSerializer
public sealed class XmlElement : IXmlElement, IXmlNode, IXmlNodeSelector, IXmlNodeSerializer
Public NotInheritable Class XmlElement Implements IXmlElement, IXmlNode, IXmlNodeSelector, IXmlNodeSerializer
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Properties

Attributes Attributes Attributes Attributes Attributes

Gets the list of attributes of this node.

ChildNodes ChildNodes ChildNodes ChildNodes ChildNodes

Gets a list of children in the current node.

FirstChild FirstChild FirstChild FirstChild FirstChild

Gets the first child node.

InnerText InnerText InnerText InnerText InnerText

Gets the text from inside the XML.

LastChild LastChild LastChild LastChild LastChild

Gets the last child node.

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

NamespaceUri NamespaceUri NamespaceUri NamespaceUri NamespaceUri

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

NextSibling NextSibling NextSibling NextSibling NextSibling

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

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

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

NodeValue NodeValue NodeValue NodeValue NodeValue

Gets or sets the text associated with the node.

OwnerDocument OwnerDocument OwnerDocument OwnerDocument OwnerDocument

Returns the root of the document that contains the node.

ParentNode ParentNode ParentNode ParentNode ParentNode

Gets the parent node of the node instance.

Prefix Prefix Prefix Prefix Prefix

Gets or sets the namespace prefix.

PreviousSibling PreviousSibling PreviousSibling PreviousSibling PreviousSibling

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

TagName TagName TagName TagName TagName

Gets the element name.

Methods

AppendChild(IXmlNode) AppendChild(IXmlNode) AppendChild(IXmlNode) AppendChild(IXmlNode) AppendChild(IXmlNode)

Appends a new child node as the last child of the node.

CloneNode(Boolean) CloneNode(Boolean) CloneNode(Boolean) CloneNode(Boolean) CloneNode(Boolean)

Clones a new node.

GetAttribute(String) GetAttribute(String) GetAttribute(String) GetAttribute(String) GetAttribute(String)

Returns the value of the attribute.

GetAttributeNode(String) GetAttributeNode(String) GetAttributeNode(String) GetAttributeNode(String) GetAttributeNode(String)

Returns the attribute node.

GetAttributeNodeNS(Object, String) GetAttributeNodeNS(Object, String) GetAttributeNodeNS(Object, String) GetAttributeNodeNS(Object, String) GetAttributeNodeNS(Object, String)

Returns the specified attribute from the specified namespace.

GetAttributeNS(Object, String) GetAttributeNS(Object, String) GetAttributeNS(Object, String) GetAttributeNS(Object, String) GetAttributeNS(Object, String)

Returns the value of the attribute.

GetElementsByTagName(String) GetElementsByTagName(String) GetElementsByTagName(String) GetElementsByTagName(String) GetElementsByTagName(String)

Returns a list of all descendant elements that match the supplied name.

GetXml() GetXml() GetXml() GetXml() GetXml()

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

HasChildNodes() HasChildNodes() HasChildNodes() HasChildNodes() HasChildNodes()

Determines whether a node has children.

InsertBefore(IXmlNode, IXmlNode) InsertBefore(IXmlNode, IXmlNode) InsertBefore(IXmlNode, IXmlNode) InsertBefore(IXmlNode, IXmlNode) InsertBefore(IXmlNode, IXmlNode)

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

Normalize() Normalize() Normalize() Normalize() Normalize()

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

RemoveAttribute(String) RemoveAttribute(String) RemoveAttribute(String) RemoveAttribute(String) RemoveAttribute(String)

Removes or replaces the named attribute.

RemoveAttributeNode(XmlAttribute) RemoveAttributeNode(XmlAttribute) RemoveAttributeNode(XmlAttribute) RemoveAttributeNode(XmlAttribute) RemoveAttributeNode(XmlAttribute)

Removes the specified attribute from this element.

RemoveAttributeNS(Object, String) RemoveAttributeNS(Object, String) RemoveAttributeNS(Object, String) RemoveAttributeNS(Object, String) RemoveAttributeNS(Object, String)

Removes the specified attribute from this element in the specified namespace.

RemoveChild(IXmlNode) RemoveChild(IXmlNode) RemoveChild(IXmlNode) RemoveChild(IXmlNode) RemoveChild(IXmlNode)

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

ReplaceChild(IXmlNode, IXmlNode) ReplaceChild(IXmlNode, IXmlNode) ReplaceChild(IXmlNode, IXmlNode) ReplaceChild(IXmlNode, IXmlNode) ReplaceChild(IXmlNode, IXmlNode)

Replaces the specified old child node with the supplied new child node.

SelectNodes(String) SelectNodes(String) SelectNodes(String) SelectNodes(String) SelectNodes(String)

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

SelectNodesNS(String, Object) SelectNodesNS(String, Object) SelectNodesNS(String, Object) SelectNodesNS(String, Object) SelectNodesNS(String, Object)

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

SelectSingleNode(String) SelectSingleNode(String) SelectSingleNode(String) SelectSingleNode(String) SelectSingleNode(String)

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

SelectSingleNodeNS(String, Object) SelectSingleNodeNS(String, Object) SelectSingleNodeNS(String, Object) SelectSingleNodeNS(String, Object) SelectSingleNodeNS(String, Object)

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

SetAttribute(String, String) SetAttribute(String, String) SetAttribute(String, String) SetAttribute(String, String) SetAttribute(String, String)

Sets the value of the named attribute.

SetAttributeNode(XmlAttribute) SetAttributeNode(XmlAttribute) SetAttributeNode(XmlAttribute) SetAttributeNode(XmlAttribute) SetAttributeNode(XmlAttribute)

Sets or updates the supplied attribute node on this element.

SetAttributeNodeNS(XmlAttribute) SetAttributeNodeNS(XmlAttribute) SetAttributeNodeNS(XmlAttribute) SetAttributeNodeNS(XmlAttribute) SetAttributeNodeNS(XmlAttribute)

Sets or updates the supplied attribute node on this element. If you are not using any namespaces, then use the SetAttributeNode method.

SetAttributeNS(Object, String, String) SetAttributeNS(Object, String, String) SetAttributeNS(Object, String, String) SetAttributeNS(Object, String, String) SetAttributeNS(Object, String, String)

Sets the value of the named attribute in the given namespace.