System.Xml.XmlElement: Method Members

The methods of System.Xml.XmlElement are listed below. For a list of all members, see the XmlElement Members list.

See Also: Inherited members from System.Xml.XmlLinkedNode

Public Methods

override
CloneNode(bool) : XmlNode

Creates a duplicate of this node.

GetAttribute(string) : string

Returns the value for the attribute with the specified name.

GetAttribute(string, string) : string

Returns the value for the attribute with the specified local name and namespace URI.

GetAttributeNode(string) : XmlAttribute

Returns the XmlAttribute with the specified name.

GetAttributeNode(string, string) : XmlAttribute

Returns the System.Xml.XmlAttribute with the specified local name and namespace URI.

GetElementsByTagName(string) : XmlNodeList

Returns an System.Xml.XmlNodeList containing a list of all descendant elements that match the specified XmlElement.Name.

GetElementsByTagName(string, string) : XmlNodeList

Returns an System.Xml.XmlNodeList containing a list of all descendant elements that match the specified XmlElement.LocalName and XmlElement.NamespaceURI.

HasAttribute(string) : bool

Determines whether the current node has an attribute with the specified name.

HasAttribute(string, string) : bool

Determines whether the current node has an attribute with the specified local name and namespace URI.

override
RemoveAll()

Removes all specified attributes and children of the current node. Default attributes are not removed.

RemoveAllAttributes()

Removes all specified attributes from the element. Default attributes are not removed.

RemoveAttribute(string)

Removes an attribute by name.

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

RemoveAttributeAt(int) : XmlNode

Removes the attribute node with the specified index from the element. (If the removed attribute has a default value, it is immediately replaced).

RemoveAttributeNode(XmlAttribute) : XmlAttribute

Removes the specified System.Xml.XmlAttribute.

RemoveAttributeNode(string, string) : XmlAttribute

Removes the System.Xml.XmlAttribute specified by the local name and namespace URI. (If the removed attribute has a default value, it is immediately replaced).

SetAttribute(string, string)

Sets the value of the attribute with the specified name.

SetAttribute(string, string, string) : string

Sets the value of the attribute with the specified local name and namespace URI.

SetAttributeNode(XmlAttribute) : XmlAttribute

Adds the specified System.Xml.XmlAttribute.

SetAttributeNode(string, string) : XmlAttribute

Adds the specified System.Xml.XmlAttribute.

override
WriteContentTo(XmlWriter)

Saves all the children of the node to the specified System.Xml.XmlWriter.

override
WriteTo(XmlWriter)

Saves the current node to the specified System.Xml.XmlWriter.