0 out of 1 rated this helpful - Rate this topic

ConfigXmlDocument Class

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Wraps the corresponding XmlDocument type and also carries the necessary information for reporting file-name and line numbers.

System.Object
  System.Xml.XmlNode
    System.Xml.XmlDocument
      System.Configuration.ConfigXmlDocument

Namespace:  System.Configuration
Assembly:  System (in System.dll)
[PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
public sealed class ConfigXmlDocument : XmlDocument, 
	IConfigErrorInfo

The ConfigXmlDocument type exposes the following members.

  Name Description
Public method ConfigXmlDocument Infrastructure. Initializes a new instance of the ConfigXmlDocument class.
Top
  Name Description
Public property Attributes Gets an XmlAttributeCollection containing the attributes of this node. (Inherited from XmlNode.)
Public property BaseURI Gets the base URI of the current node. (Inherited from XmlDocument.)
Public property ChildNodes Gets all the child nodes of the node. (Inherited from XmlNode.)
Public property DocumentElement Gets the root XmlElement for the document. (Inherited from XmlDocument.)
Public property DocumentType Gets the node containing the DOCTYPE declaration. (Inherited from XmlDocument.)
Public property Filename Infrastructure. Gets the configuration file name.
Public property FirstChild Gets the first child of the node. (Inherited from XmlNode.)
Public property HasChildNodes Gets a value indicating whether this node has any child nodes. (Inherited from XmlNode.)
Public property Implementation Gets the XmlImplementation object for the current document. (Inherited from XmlDocument.)
Public property InnerText Gets the concatenated values of the node and all its child nodes. (Inherited from XmlDocument.)
Public property InnerXml Gets or sets the markup representing the children of the current node. (Inherited from XmlDocument.)
Public property IsReadOnly Gets a value indicating whether the current node is read-only. (Inherited from XmlDocument.)
Public property Item[String] Gets the first child element with the specified Name. (Inherited from XmlNode.)
Public property Item[String, String] Gets the first child element with the specified LocalName and NamespaceURI. (Inherited from XmlNode.)
Public property LastChild Gets the last child of the node. (Inherited from XmlNode.)
Public property LineNumber Infrastructure. Gets the current node line number.
Public property LocalName Gets the local name of the node. (Inherited from XmlDocument.)
Public property Name Gets the qualified name of the node. (Inherited from XmlDocument.)
Public property NamespaceURI Gets the namespace URI of this node. (Inherited from XmlNode.)
Public property NameTable Gets the XmlNameTable associated with this implementation. (Inherited from XmlDocument.)
Public property NextSibling Gets the node immediately following this node. (Inherited from XmlNode.)
Public property NodeType Gets the type of the current node. (Inherited from XmlDocument.)
Public property OuterXml Gets the markup representing this node and all its child nodes. (Inherited from XmlNode.)
Public property OwnerDocument Gets the XmlDocument to which the current node belongs. (Inherited from XmlDocument.)
Public property ParentNode Gets the parent node of this node (for nodes that can have parents). (Inherited from XmlDocument.)
Public property Prefix Gets or sets the namespace prefix of this node. (Inherited from XmlNode.)
Public property PreserveWhitespace Gets or sets a value indicating whether to preserve white space in element content. (Inherited from XmlDocument.)
Public property PreviousSibling Gets the node immediately preceding this node. (Inherited from XmlNode.)
Public property SchemaInfo Returns the Post-Schema-Validation-Infoset (PSVI) of the node. (Inherited from XmlDocument.)
Public property Schemas Gets or sets the XmlSchemaSet object associated with this XmlDocument. (Inherited from XmlDocument.)
Public property Value Gets or sets the value of the node. (Inherited from XmlNode.)
Public property XmlResolver Sets the XmlResolver to use for resolving external resources. (Inherited from XmlDocument.)
Top
  Name Description
Public method AppendChild Adds the specified node to the end of the list of child nodes, of this node. (Inherited from XmlNode.)
Public method Clone Creates a duplicate of this node. (Inherited from XmlNode.)
Public method CloneNode Creates a duplicate of this node. (Inherited from XmlDocument.)
Public method CreateAttribute(String) Creates an XmlAttribute with the specified Name. (Inherited from XmlDocument.)
Public method CreateAttribute(String, String) Creates an XmlAttribute with the specified qualified name and NamespaceURI. (Inherited from XmlDocument.)
Public method CreateAttribute(String, String, String) Infrastructure. Creates a configuration element attribute. (Overrides XmlDocument.CreateAttribute(String, String, String).)
Public method CreateCDataSection Infrastructure. Creates an XML CData section. (Overrides XmlDocument.CreateCDataSection(String).)
Public method CreateComment Infrastructure. Create an XML comment. (Overrides XmlDocument.CreateComment(String).)
Protected method CreateDefaultAttribute Creates a default attribute with the specified prefix, local name and namespace URI. (Inherited from XmlDocument.)
Public method CreateDocumentFragment Creates an XmlDocumentFragment. (Inherited from XmlDocument.)
Public method CreateDocumentType Returns a new XmlDocumentType object. (Inherited from XmlDocument.)
Public method CreateElement(String) Creates an element with the specified name. (Inherited from XmlDocument.)
Public method CreateElement(String, String) Creates an XmlElement with the qualified name and NamespaceURI. (Inherited from XmlDocument.)
Public method CreateElement(String, String, String) Infrastructure. Creates a configuration element. (Overrides XmlDocument.CreateElement(String, String, String).)
Public method CreateEntityReference Creates an XmlEntityReference with the specified name. (Inherited from XmlDocument.)
Public method CreateNavigator() Creates a new XPathNavigator object for navigating this document. (Inherited from XmlDocument.)
Protected method CreateNavigator(XmlNode) Creates an XPathNavigator object for navigating this document positioned on the XmlNode specified. (Inherited from XmlDocument.)
Public method CreateNode(String, String, String) Creates an XmlNode with the specified node type, Name, and NamespaceURI. (Inherited from XmlDocument.)
Public method CreateNode(XmlNodeType, String, String) Creates an XmlNode with the specified XmlNodeType, Name, and NamespaceURI. (Inherited from XmlDocument.)
Public method CreateNode(XmlNodeType, String, String, String) Creates a XmlNode with the specified XmlNodeType, Prefix, Name, and NamespaceURI. (Inherited from XmlDocument.)
Public method CreateProcessingInstruction Creates an XmlProcessingInstruction with the specified name and data. (Inherited from XmlDocument.)
Public method CreateSignificantWhitespace Infrastructure. Creates white spaces. (Overrides XmlDocument.CreateSignificantWhitespace(String).)
Public method CreateTextNode Infrastructure. Create a text node. (Overrides XmlDocument.CreateTextNode(String).)
Public method CreateWhitespace Infrastructure. Creates white space. (Overrides XmlDocument.CreateWhitespace(String).)
Public method CreateXmlDeclaration Creates an XmlDeclaration node with the specified values. (Inherited from XmlDocument.)
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetElementById Gets the XmlElement with the specified ID. (Inherited from XmlDocument.)
Public method GetElementsByTagName(String) Returns an XmlNodeList containing a list of all descendant elements that match the specified Name. (Inherited from XmlDocument.)
Public method GetElementsByTagName(String, String) Returns an XmlNodeList containing a list of all descendant elements that match the specified LocalName and NamespaceURI. (Inherited from XmlDocument.)
Public method GetEnumerator Provides support for the for each style iteration over the nodes in the XmlNode. (Inherited from XmlNode.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetNamespaceOfPrefix 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. (Inherited from XmlNode.)
Public method GetPrefixOfNamespace 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. (Inherited from XmlNode.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method ImportNode Imports a node from another document to the current document. (Inherited from XmlDocument.)
Public method InsertAfter Inserts the specified node immediately after the specified reference node. (Inherited from XmlNode.)
Public method InsertBefore Inserts the specified node immediately before the specified reference node. (Inherited from XmlNode.)
Public method Load(Stream) Loads the XML document from the specified stream. (Inherited from XmlDocument.)
Public method Load(String) Infrastructure. Loads the configuration file. (Overrides XmlDocument.Load(String).)
Public method Load(TextReader) Loads the XML document from the specified TextReader. (Inherited from XmlDocument.)
Public method Load(XmlReader) Loads the XML document from the specified XmlReader. (Inherited from XmlDocument.)
Public method LoadSingleElement Infrastructure. Loads a single configuration element.
Public method LoadXml Loads the XML document from the specified string. (Inherited from XmlDocument.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method Normalize 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. (Inherited from XmlNode.)
Public method PrependChild Adds the specified node to the beginning of the list of child nodes for this node. (Inherited from XmlNode.)
Public method ReadNode Creates an XmlNode object based on the information in the XmlReader. The reader must be positioned on a node or attribute. (Inherited from XmlDocument.)
Public method RemoveAll Removes all the child nodes and/or attributes of the current node. (Inherited from XmlNode.)
Public method RemoveChild Removes specified child node. (Inherited from XmlNode.)
Public method ReplaceChild Replaces the child node oldChild with newChild node. (Inherited from XmlNode.)
Public method Save(Stream) Saves the XML document to the specified stream. (Inherited from XmlDocument.)
Public method Save(String) Saves the XML document to the specified file. (Inherited from XmlDocument.)
Public method Save(TextWriter) Saves the XML document to the specified TextWriter. (Inherited from XmlDocument.)
Public method Save(XmlWriter) Saves the XML document to the specified XmlWriter. (Inherited from XmlDocument.)
Public method SelectNodes(String) Selects a list of nodes matching the XPath expression. (Inherited from XmlNode.)
Public method SelectNodes(String, XmlNamespaceManager) Selects a list of nodes matching the XPath expression. Any prefixes found in the XPath expression are resolved using the supplied XmlNamespaceManager. (Inherited from XmlNode.)
Public method SelectSingleNode(String) Selects the first XmlNode that matches the XPath expression. (Inherited from XmlNode.)
Public method SelectSingleNode(String, XmlNamespaceManager) Selects the first XmlNode that matches the XPath expression. Any prefixes found in the XPath expression are resolved using the supplied XmlNamespaceManager. (Inherited from XmlNode.)
Public method Supports Test if the DOM implementation implements a specific feature. (Inherited from XmlNode.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Public method Validate(ValidationEventHandler) Validates the XmlDocument against the XML Schema Definition Language (XSD) schemas contained in the Schemas property. (Inherited from XmlDocument.)
Public method Validate(ValidationEventHandler, XmlNode) Validates the XmlNode object specified against the XML Schema Definition Language (XSD) schemas in the Schemas property. (Inherited from XmlDocument.)
Public method WriteContentTo Saves all the children of the XmlDocument node to the specified XmlWriter. (Inherited from XmlDocument.)
Public method WriteTo Saves the XmlDocument node to the specified XmlWriter. (Inherited from XmlDocument.)
Top
  Name Description
Public event NodeChanged Occurs when the Value of a node belonging to this document has been changed. (Inherited from XmlDocument.)
Public event NodeChanging Occurs when the Value of a node belonging to this document is about to be changed. (Inherited from XmlDocument.)
Public event NodeInserted Occurs when a node belonging to this document has been inserted into another node. (Inherited from XmlDocument.)
Public event NodeInserting Occurs when a node belonging to this document is about to be inserted into another node. (Inherited from XmlDocument.)
Public event NodeRemoved Occurs when a node belonging to this document has been removed from its parent. (Inherited from XmlDocument.)
Public event NodeRemoving Occurs when a node belonging to this document is about to be removed from the document. (Inherited from XmlDocument.)
Top
  Name Description
Explicit interface implemetation Private method ICloneable.Clone For a description of this member, see XmlNode.Clone. (Inherited from XmlNode.)
Explicit interface implemetation Private property IConfigErrorInfo.Filename Infrastructure. Gets the configuration file name.
Explicit interface implemetation Private property IConfigErrorInfo.LineNumber Infrastructure. Gets the configuration line number.
Explicit interface implemetation Private method IEnumerable.GetEnumerator For a description of this member, see XmlNode.GetEnumerator. (Inherited from XmlNode.)
Top

The ConfigXmlDocument wraps the corresponding XmlDocument type to carry the necessary information for reporting file-name and line numbers. This information is necessary when the system issues configuration errors.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

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 Requirements.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ