System::Xml::XmlNode class

XmlNode class

Represents a single node in the XML document.

class XmlNode : public System::Collections::Generic::IEnumerable<SharedPtr<System::Xml::XmlNode>>,
                public System::Xml::XPath::IXPathNavigable

Methods

MethodDescription
virtual AppendChild(SharedPtr<XmlNode>)Adds the specified node to the end of the list of child nodes, of this node.
virtual Clone()Creates a duplicate of this node.
virtual CloneNode(bool)Creates a duplicate of the node, when overridden in a derived class.
CreateNavigator() overrideCreates an XPathNavigator for navigating this object.
virtual get_Attributes()Returns an XmlAttributeCollection containing the attributes of this node.
virtual get_BaseURI()Returns the base URI of the current node.
virtual get_ChildNodes()Returns all the child nodes of the node.
virtual get_FirstChild()Returns the first child of the node.
virtual get_HasChildNodes()Returns a value indicating whether this node has any child nodes.
virtual get_InnerText()Returns the concatenated values of the node and all its child nodes.
virtual get_InnerXml()Returns the markup representing only the child nodes of this node.
virtual get_IsReadOnly()Returns a value indicating whether the node is read-only.
virtual get_LastChild()Returns the last child of the node.
virtual get_LocalName()Returns the local name of the node, when overridden in a derived class.
virtual get_Name()Returns the qualified name of the node, when overridden in a derived class.
virtual get_NamespaceURI()Returns the namespace URI of this node.
virtual get_NextSibling()Returns the node immediately following this node.
virtual get_NodeType()Returns the type of the current node, when overridden in a derived class.
virtual get_OuterXml()Returns the markup containing this node and all its child nodes.
virtual get_OwnerDocument()Returns the XmlDocument to which this node belongs.
virtual get_ParentNode()Returns the parent of this node (for nodes that can have parents).
virtual get_Prefix()Returns the namespace prefix of this node.
virtual get_PreviousSibling()Returns the node immediately preceding this node.
virtual get_PreviousText()Returns the text node that immediately precedes this node.
virtual get_SchemaInfo()Returns the post schema validation infoset that has been assigned to this node as a result of schema validation.
virtual get_Value()Returns the value of the node.
GetEnumerator() overrideReturns an enumerator that iterates through the child nodes in the current node.
virtual GetNamespaceOfPrefix(String)Looks up the closest xmlns declaration for the given prefix that is in scope for the current node and returns the namespace URI in the declaration.
virtual GetPrefixOfNamespace(String)Looks up the closest xmlns declaration for the given namespace URI that is in scope for the current node and returns the prefix defined in that declaration.
virtual idx_get(String)Returns the first child element with the specified XmlNode::get_Name.
virtual idx_get(String, String)Returns the first child element with the specified XmlNode::get_LocalName and XmlNode::get_NamespaceURI values.
virtual InsertAfter(SharedPtr<XmlNode>, SharedPtr<XmlNode>)Inserts the specified node immediately after the specified reference node.
virtual InsertBefore(SharedPtr<XmlNode>, SharedPtr<XmlNode>)Inserts the specified node immediately before the specified reference node.
virtual Normalize()Puts all XmlText nodes in the full depth of the sub-tree underneath this XmlNode into a “normal” form where only markup (that is, tags, comments, processing instructions, CDATA sections, and entity references) separates XmlText nodes, that is, there are no adjacent XmlText nodes.
virtual PrependChild(SharedPtr<XmlNode>)Adds the specified node to the beginning of the list of child nodes for this node.
virtual RemoveAll()Removes all the child nodes and/or attributes of the current node.
virtual RemoveChild(SharedPtr<XmlNode>)Removes specified child node.
virtual ReplaceChild(SharedPtr<XmlNode>, SharedPtr<XmlNode>)Replaces the child node oldChild with newChild node.
SelectNodes(const String&)Selects a list of nodes matching the XPath expression.
SelectNodes(const String&, const SharedPtr<XmlNamespaceManager>&)Selects a list of nodes matching the XPath expression. Any prefixes found in the XPath expression are resolved using the supplied XmlNamespaceManager.
SelectSingleNode(const String&)Selects the first XmlNode that matches the XPath expression.
SelectSingleNode(const String&, const SharedPtr<XmlNamespaceManager>&)Selects the first XmlNode that matches the XPath expression. Any prefixes found in the XPath expression are resolved using the supplied XmlNamespaceManager.
virtual set_InnerText(String)Sets the concatenated values of the node and all its child nodes.
virtual set_InnerXml(String)Sets the markup representing only the child nodes of this node.
virtual set_Prefix(String)Sets the namespace prefix of this node.
virtual set_Value(String)Sets the value of the node.
virtual Supports(String, String)Tests if the DOM implementation implements a specific feature.
virtual WriteContentTo(const SharedPtr<XmlWriter>&)Saves all the child nodes of the node to the specified XmlWriter, when overridden in a derived class.
virtual WriteTo(const SharedPtr<XmlWriter>&)Saves the current node to the specified XmlWriter, when overridden in a derived class.

Typedefs

TypedefDescription
PtrAn alias for shared pointer to an instance of this class.

See Also