|
System.Xml (system.xml.dll)
|
|
This abstract class represents a node in a document. A node is the
basic object described by the Document Object Model for XML. A node
can be an element, an element's attributes, the DOCTYPE declaration,
a comment, or the entire document itself. Nodes are ordered in a
hierarchical tree in which child, parent, and sibling relationships
are "known" by each node.
The XmlNode class is the parent object of the specific node
type classes. The properties of this class expose the intrinsic
values of the node: NamespaceURI, NodeType, parent, child, sibling nodes, etc. The methods allow a node to add to or remove
from a node tree (in the context of an XmlDocument or XmlDocumentFragment),
with respect to a reference node.
public abstract class XmlNode : ICloneable, IEnumerable, System.Xml.XPath.IXPathNavigable {
// Public Instance Properties
public virtual field XmlAttributeCollection Attributes{get; }
public virtual field string BaseURI{get; }
public virtual field XmlNodeList ChildNodes{get; }
public virtual field XmlNode FirstChild{get; }
public virtual field bool HasChildNodes{get; }
public virtual field string InnerText{set; get; }
public virtual field string InnerXml{set; get; }
public virtual field bool IsReadOnly{get; }
public virtual field XmlNode LastChild{get; }
public abstract field string LocalName{get; }
public abstract field string Name{get; }
public virtual field string NamespaceURI{get; }
public virtual field XmlNode NextSibling{get; }
public abstract field XmlNodeType NodeType{get; }
public virtual field string OuterXml{get; }
public virtual field XmlDocument OwnerDocument{get; }
public virtual field XmlNode ParentNode{get; }
public virtual field string Prefix{set; get; }
public virtual field XmlNode PreviousSibling{get; }
public virtual field XmlElement this{get; }
public virtual field XmlElement this{get; }
public virtual field string Value{set; get; }
// Public Instance Methods
public virtual method XmlNode AppendChild(
XmlNode newChild);
public virtual method XmlNode Clone();
public abstract method XmlNode CloneNode(bool deep);
public method XPathNavigator CreateNavigator(); // implements System.Xml.XPath.IXPathNavigable
public method IEnumerator GetEnumerator(); // implements IEnumerable
public virtual method string GetNamespaceOfPrefix(
string prefix);
public virtual method string GetPrefixOfNamespace(
string namespaceURI);
public virtual method XmlNode InsertAfter(XmlNode newChild,
XmlNode refChild);
public virtual method XmlNode InsertBefore(
XmlNode newChild, XmlNode refChild);
public virtual method void Normalize();
public virtual method XmlNode PrependChild(
XmlNode newChild);
public virtual method void RemoveAll();
public virtual method XmlNode RemoveChild(
XmlNode oldChild);
public virtual method XmlNode ReplaceChild(
XmlNode newChild, XmlNode oldChild);
public method XmlNodeList SelectNodes(string xpath);
public method XmlNodeList SelectNodes(string xpath,
XmlNamespaceManager nsmgr);
public method XmlNode SelectSingleNode(string xpath);
public method XmlNode SelectSingleNode(string xpath,
XmlNamespaceManager nsmgr);
public virtual method bool Supports(string feature,
string version);
public abstract method void WriteContentTo(XmlWriter w);
public abstract method void WriteTo(XmlWriter w);
}
Subclasses
XmlAttribute, XmlDocument, XmlDocumentFragment, XmlEntity, XmlLinkedNode, XmlNotation
Returned By
Multiple types
Passed To
XmlDataDocument.CreateNavigator(), XmlDocument.ImportNode(), XmlNamedNodeMap.SetNamedItem(), XmlNodeReader.XmlNodeReader()