XmlNode Class
Represents a single node in the XML document.
Assembly: System.Xml (in System.Xml.dll)
The XmlNode type exposes the following members.
| Name | Description | |
|---|---|---|
|
Attributes9 | Gets an XmlAttributeCollection10 containing the attributes of this node. |
|
BaseURI11 | Gets the base URI of the current node. |
|
ChildNodes12 | Gets all the child nodes of the node. |
|
FirstChild13 | Gets the first child of the node. |
|
HasChildNodes14 | Gets a value indicating whether this node has any child nodes. |
|
InnerText15 | Gets or sets the concatenated values of the node and all its child nodes. |
|
InnerXml16 | Gets or sets the markup representing only the child nodes of this node. |
|
IsReadOnly17 | Gets a value indicating whether the node is read-only. |
|
Item[String]18 | Gets the first child element with the specified Name19. |
|
Item[String, String]20 | Gets the first child element with the specified LocalName21 and NamespaceURI22. |
|
LastChild23 | Gets the last child of the node. |
|
LocalName21 | When overridden in a derived class, gets the local name of the node. |
|
Name19 | When overridden in a derived class, gets the qualified name of the node. |
|
NamespaceURI22 | Gets the namespace URI of this node. |
|
NextSibling24 | Gets the node immediately following this node. |
|
NodeType25 | When overridden in a derived class, gets the type of the current node. |
|
OuterXml26 | Gets the markup representing this node and all its child nodes. |
|
OwnerDocument27 | Gets the XmlDocument3 to which this node belongs. |
|
ParentNode28 | Gets the parent of this node (for nodes that can have parents). |
|
Prefix29 | Gets or sets the namespace prefix of this node. |
|
PreviousSibling30 | Gets the node immediately preceding this node. |
|
SchemaInfo31 | Gets the post schema validation infoset that has been assigned to this node as a result of schema validation. |
|
Value32 | Gets or sets the value of the node. |
| Name | Description | |
|---|---|---|
|
AppendChild33 | Adds the specified node to the end of the list of child nodes, of this node. |
|
Clone34 | Creates a duplicate of this node. |
|
CloneNode35 | When overridden in a derived class, creates a duplicate of the node. |
|
CreateNavigator36 | Creates an XPathNavigator37 for navigating this object. |
|
Equals(Object)38 | Determines whether the specified Object1 is equal to the current Object1. (Inherited from Object1.) |
|
Finalize39 | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object1.) |
|
GetEnumerator40 | Provides support for the for each style iteration over the nodes in the XmlNode. |
|
GetHashCode41 | Serves as a hash function for a particular type. (Inherited from Object1.) |
|
GetNamespaceOfPrefix42 | Looks up the closest xmlns declaration for the given prefix that is in scope for the current node and returns the namespace URI in the declaration. |
|
GetPrefixOfNamespace43 | Looks up the closest xmlns declaration for the given namespace URI that is in scope for the current node and returns the prefix defined in that declaration. |
|
GetType44 | Gets the Type45 of the current instance. (Inherited from Object1.) |
|
InsertAfter46 | Inserts the specified node immediately after the specified reference node. |
|
InsertBefore47 | Inserts the specified node immediately before the specified reference node. |
|
MemberwiseClone48 | Creates a shallow copy of the current Object1. (Inherited from Object1.) |
|
Normalize49 | Puts all XmlText nodes in the full depth of the sub-tree underneath this XmlNode into a "normal" form where only markup (that is, tags, comments, processing instructions, CDATA sections, and entity references) separates XmlText nodes, that is, there are no adjacent XmlText nodes. |
|
PrependChild50 | Adds the specified node to the beginning of the list of child nodes for this node. |
|
RemoveAll51 | Removes all the child nodes and/or attributes of the current node. |
|
RemoveChild52 | Removes specified child node. |
|
ReplaceChild53 | Replaces the child node oldChild with newChild node. |
|
SelectNodes(String)54 | Selects a list of nodes matching the XPath expression. |
|
SelectNodes(String, XmlNamespaceManager)55 | Selects a list of nodes matching the XPath expression. Any prefixes found in the XPath expression are resolved using the supplied XmlNamespaceManager56. |
|
SelectSingleNode(String)57 | Selects the first XmlNode that matches the XPath expression. |
|
SelectSingleNode(String, XmlNamespaceManager)58 | Selects the first XmlNode that matches the XPath expression. Any prefixes found in the XPath expression are resolved using the supplied XmlNamespaceManager56. |
|
Supports59 | Test if the DOM implementation implements a specific feature. |
|
ToString60 | Returns a string that represents the current object. (Inherited from Object1.) |
|
WriteContentTo61 | When overridden in a derived class, saves all the child nodes of the node to the specified XmlWriter62. |
|
WriteTo63 | When overridden in a derived class, saves the current node to the specified XmlWriter62. |
| Name | Description | |
|---|---|---|
|
AsParallel64 | Enables parallelization of a query. (Defined by ParallelEnumerable65.) |
|
AsQueryable66 | Converts an IEnumerable67 to an IQueryable68. (Defined by Queryable69.) |
|
Cast<TResult>70 | Converts the elements of an IEnumerable67 to the specified type. (Defined by Enumerable71.) |
|
OfType<TResult>72 | Filters the elements of an IEnumerable67 based on a specified type. (Defined by Enumerable71.) |
| Name | Description | |
|---|---|---|
|
ICloneable.Clone73 | For a description of this member, see XmlNode.Clone34. |
|
IEnumerable.GetEnumerator74 | For a description of this member, see XmlNode.GetEnumerator40. |
This class implements the W3C Document Object Model (DOM) Level 1 Core and the Core DOM Level 2. The DOM is an in-memory (cache) tree representation of an XML document. XmlNode is the base class in the.NET implementation of the DOM. It supports XPath selections and provides editing capabilities. The XmlDocument3 class extends XmlNode and represents an XML document. You can use XmlDocument to load and save XML data. It also includes methods for node creation. See XML Document Object Model (DOM)75 for more information.
Security Note
|
|---|
|
Exceptions raised as a result of using the XmlNode class, such as the XmlException76 class may contain sensitive information that should not be exposed in untrusted scenarios. Exceptions should be properly handled so that this sensitive information is not exposed in untrusted scenarios. |
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements77.
- 1/17/2012
- קייפ ישראל
- 1/17/2012
- קייפ ישראל
Security Note