XmlAttribute, classe
Réduire la table des matières
Développer la table des matières

XmlAttribute Class

Représente un attribut d'un XmlElement. Les valeurs valides et par défaut de l'attribut sont définies dans une DTD (Document Type Definition) ou un schéma.

Syntaxe


var xmlAttribute = XmlDocument.createAttribute();
var xmlAttribute = XmlDocument.createAttributeNS();

Attributs

[MarshalingBehavior(Agile)]
[Version(0x06020000)]

Membres

XmlAttributeClasse possède ces types de membres :

Méthodes

The XmlAttribute Classe a les méthodes suivantes. Avec C#, Visual Basic et C++, elle hérite également des méthodes de Object Classe.

MéthodeDescription
AppendChild This method is not applicable to this class and will throw an exception.
CloneNode Clones a new node.
GetXml Returns the XML representation of the node and all its descendants.
HasChildNodes Determines whether a node has children.
InsertBefore 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 Removes the specified child node from the list of children and returns it.
ReplaceChild Replaces the specified old child node with the supplied new child node.
SelectNodes Applies the specified pattern-matching operation to this node's context and returns the list of matching nodes as an XmlNodeList.
SelectNodesNS Applies the specified pattern-matching operation to this node's context and returns the list of matching nodes as an XmlNodeList.
SelectSingleNode Applies the specified pattern-matching operation to this node's context and returns the first matching node.
SelectSingleNodeNS Applies the specified pattern-matching operation to this node's context and returns the first matching node.

 

Propriétés

Le XmlAttributeClasse a les propriétés suivantes.

PropriétéType d'accèsDescription

Attributes

En lecture seuleThis method is not applicable to this class and will throw an exception.

ChildNodes

En lecture seuleGets a list of children in the current node.

FirstChild

En lecture seuleGets the first child node.

InnerText

Lecture/écritureGets the text from inside the XML.

LastChild

En lecture seuleGets the last child node.

LocalName

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

Name

En lecture seuleReturns the attribute name.

NamespaceUri

En lecture seuleReturns the Uniform Resource Identifier (URI) for the namespace.

NextSibling

En lecture seuleThis property is not applicable to this class and will always return null.

NodeName

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

NodeType

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

NodeValue

Lecture/écritureGets or sets the text associated with the node.

OwnerDocument

En lecture seuleReturns the root of the document that contains the node.

ParentNode

En lecture seuleThis property is not applicable to this class and will throw an exception.

Prefix

Lecture/écritureGets or sets the namespace prefix.

PreviousSibling

En lecture seuleThis property is not applicable to this class and will throw an exception.

Specified

En lecture seuleGets 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

Lecture/écritureGets or sets the attribute value.

 

Conditions requises

Client minimal pris en charge

Windows 8 [Applications Windows Store uniquement]

Serveur minimal pris en charge

Windows Server 2012 [Applications Windows Store uniquement]

Espace de noms

Windows.Data.Xml.Dom
Windows::Data::Xml::Dom [C++]

Métadonnées

Windows.winmd

 

 

Afficher:
© 2017 Microsoft