Windows Dev Center

XmlComment Class

Représente un commentaire XML.

Syntaxe


var xmlComment = XmlDocument.createComment();

Attributs

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

Membres

XmlCommentClasse possède ces types de membres :

Méthodes

The XmlComment 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 Appends a new child node as the last child of the node. This method is not applicable to this class and it will throw an exception.
AppendData Appends the supplied string to the existing string data.
CloneNode Clones a new node.
DeleteData Deletes the specified data.
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 list. This method is not applicable to this class and will throw an exception.
InsertData Inserts a string at the specified offset.
Normalize Normalizes all descendant elements by combining two or more adjacent text nodes into one unified text node.
RemoveChild Removes the specified child node from the list of children and returns it. This method is not applicable to this class and will throw an exception.
ReplaceChild Replaces the specified old child node with the supplied new child node. This method is not applicable to this class and will throw an exception.
ReplaceData Replaces the specified number of characters with the supplied string.
SelectNodes Applies the specified pattern-matching operation to this node's context and returns the list of matching nodes as an XmlNodeList. This method is not applicable to this class and will throw an exception.
SelectNodesNS Applies the specified pattern-matching operation to this node's context and returns the list of matching nodes as an XmlNodeList. This method is not applicable to this class and will throw an exception.
SelectSingleNode Applies the specified pattern-matching operation to this node's context and returns the first matching node. This method is not applicable to this class and will throw an exception.
SelectSingleNodeNS Applies the specified pattern-matching operation to this node's context and returns the first matching node. This method is not applicable to this class and will throw an exception.
SubstringData Retrieves a substring of the full string from the specified range.

 

Propriétés

Le XmlCommentClasse a les propriétés suivantes.

PropriétéType d'accèsDescription

Attributes

En lecture seuleGets the list of attributes of this node.

ChildNodes

En lecture seuleGets a list of children in the current node. This method always returns NULL.

Data

Lecture/écritureGets or sets the node data depending on the node type.

FirstChild

En lecture seuleGets the first child node. This property always returns NULL.

InnerText

Lecture/écritureGets the text from inside the XML.

LastChild

En lecture seuleGets the last child node. This property always returns NULL.

Length

En lecture seuleGets the length of the data in Unicode characters.

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.

NamespaceUri

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

NextSibling

En lecture seuleGets the next sibling of the node in the parent's child list.

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 seuleGets the parent node of the node instance.

Prefix

Lecture/écritureGets or sets the namespace prefix.

PreviousSibling

En lecture seuleGets the previous sibling of the node in the parent's child list.

 

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:
© 2015 Microsoft