Share via


XmlAttribute Class

Definition

Represents an attribute of an XmlElement. Valid and default values for the attribute are defined in a document type definition (DTD) or schema.

public ref class XmlAttribute sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class XmlAttribute final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class XmlAttribute
Public NotInheritable Class XmlAttribute
Inheritance
Object Platform::Object IInspectable XmlAttribute
Attributes
Implements

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Properties

Attributes

This method is not applicable to this class and will throw an exception.

ChildNodes

Gets a list of children in the current node.

FirstChild

Gets the first child node.

InnerText

Gets the text from inside the XML.

LastChild

Gets the last child node.

LocalName

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

Name

Returns the attribute name.

NamespaceUri

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

NextSibling

This property is not applicable to this class and will always return null.

NodeName

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

NodeType

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

NodeValue

Gets or sets the text associated with the node.

OwnerDocument

Returns the root of the document that contains the node.

ParentNode

This property is not applicable to this class and will throw an exception.

Prefix

Gets or sets the namespace prefix.

PreviousSibling

This property is not applicable to this class and will throw an exception.

Specified

Gets a value that indicates whether the attribute is explicitly specified or derived from a default value in the document type definition (DTD) or schema.

Value

Gets or sets the attribute value.

Methods

AppendChild(IXmlNode)

This method is not applicable to this class and will throw an exception.

CloneNode(Boolean)

Clones a new node.

GetXml()

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

HasChildNodes()

Determines whether a node has children.

InsertBefore(IXmlNode, IXmlNode)

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

Normalize()

This method is not applicable to this class and will throw an exception.

RemoveChild(IXmlNode)

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

ReplaceChild(IXmlNode, IXmlNode)

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

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)

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

SelectSingleNode(String)

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

SelectSingleNodeNS(String, Object)

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

Applies to