System::Xml::XmlElement class

XmlElement class

Represents an element.

class XmlElement : public System::Xml::XmlLinkedNode

Methods

MethodDescription
CloneNode(bool) overrideCreates a duplicate of this node.
virtual get_HasAttributes()Returns a bool value indicating whether the current node has any attributes.
get_InnerText() overrideReturns the concatenated values of the node and all its children.
get_InnerXml() overrideReturns the markup representing just the children of this node.
get_IsEmpty()Returns the tag format of the element.
get_LocalName() overrideReturns the local name of the current node.
get_Name() overrideReturns the qualified name of the node.
get_NamespaceURI() overrideReturns the namespace URI of this node.
get_NodeType() overrideReturns the type of the current node.
get_OwnerDocument() overrideReturns the XmlDocument to which this node belongs.
get_Prefix() overrideReturns the namespace prefix of this node.
get_SchemaInfo() overrideReturns the post schema validation infoset that has been assigned to this node as a result of schema validation.
virtual GetAttribute(String)Returns the value for the attribute with the specified name.
virtual GetAttribute(String, String)Returns the value for the attribute with the specified local name and namespace URI.
virtual GetAttributeNode(String)Returns the XmlAttribute with the specified name.
virtual GetAttributeNode(String, String)Returns the XmlAttribute with the specified local name and namespace URI.
virtual GetElementsByTagName(String)Returns an XmlNodeList containing a list of all descendant elements that match the specified XmlElement::get_Name.
virtual GetElementsByTagName(String, String)Returns an XmlNodeList containing a list of all descendant elements that match the specified XmlElement::get_LocalName and XmlElement::get_NamespaceURI values.
virtual HasAttribute(String)Determines whether the current node has an attribute with the specified name.
virtual HasAttribute(String, String)Determines whether the current node has an attribute with the specified local name and namespace URI.
RemoveAll() overrideRemoves all specified attributes and children of the current node. Default attributes are not removed.
virtual RemoveAllAttributes()Removes all specified attributes from the element. Default attributes are not removed.
virtual RemoveAttribute(String)Removes an attribute by name.
virtual RemoveAttribute(String, String)Removes an attribute with the specified local name and namespace URI. (If the removed attribute has a default value, it is immediately replaced).
virtual RemoveAttributeAt(int32_t)Removes the attribute node with the specified index from the element. (If the removed attribute has a default value, it is immediately replaced).
virtual RemoveAttributeNode(SharedPtr<XmlAttribute>)Removes the specified XmlAttribute.
virtual RemoveAttributeNode(String, String)Removes the XmlAttribute specified by the local name and namespace URI. (If the removed attribute has a default value, it is immediately replaced).
set_InnerText(String) overrideSets the concatenated values of the node and all its children.
set_InnerXml(String) overrideSets the markup representing just the children of this node.
set_IsEmpty(bool)Sets the tag format of the element.
set_Prefix(String) overrideSets the namespace prefix of this node.
virtual SetAttribute(String, String)Sets the value of the attribute with the specified name.
virtual SetAttribute(String, String, String)Sets the value of the attribute with the specified local name and namespace URI.
virtual SetAttributeNode(SharedPtr<XmlAttribute>)Adds the specified XmlAttribute.
virtual SetAttributeNode(String, String)Adds the specified XmlAttribute.
WriteContentTo(const SharedPtr<XmlWriter>&) overrideSaves all the children of the node to the specified XmlWriter.
WriteTo(const SharedPtr<XmlWriter>&) overrideSaves the current node to the specified XmlWriter.

Typedefs

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

Remarks

Objects of this class should only be allocated using System::MakeObject() function. Never create instances of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

See Also