O'Reilly logo

C# in a Nutshell by Peter Drayton, Ted Neward, Ben Albahari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

XmlNode

Synopsis

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required