Export (0) Print
Expand All

XmlDataDocument Class

Note: This API is now obsolete.

Allows structured data to be stored, retrieved, and manipulated through a relational DataSet.

System.Object
  System.Xml.XmlNode
    System.Xml.XmlDocument
      System.Xml.XmlDataDocument

Namespace:  System.Xml
Assembly:  System.Data (in System.Data.dll)

[ObsoleteAttribute("XmlDataDocument class will be removed in a future release.")]
[HostProtectionAttribute(SecurityAction.LinkDemand, Synchronization = true)]
public class XmlDataDocument : XmlDocument

The XmlDataDocument type exposes the following members.

  NameDescription
Public methodXmlDataDocument()Initializes a new instance of the XmlDataDocument class.
Public methodXmlDataDocument(DataSet)Initializes a new instance of the XmlDataDocument class with the specified DataSet.
Top

  NameDescription
Public propertyAttributesGets an XmlAttributeCollection containing the attributes of this node. (Inherited from XmlNode.)
Public propertyBaseURIGets the base URI of the current node. (Inherited from XmlDocument.)
Public propertyChildNodesGets all the child nodes of the node. (Inherited from XmlNode.)
Public propertyDataSetGets a DataSet that provides a relational representation of the data in the XmlDataDocument.
Public propertyDocumentElementGets the root XmlElement for the document. (Inherited from XmlDocument.)
Public propertyDocumentTypeGets the node containing the DOCTYPE declaration. (Inherited from XmlDocument.)
Public propertyFirstChildGets the first child of the node. (Inherited from XmlNode.)
Public propertyHasChildNodesGets a value indicating whether this node has any child nodes. (Inherited from XmlNode.)
Public propertyImplementationGets the XmlImplementation object for the current document. (Inherited from XmlDocument.)
Public propertyInnerTextGets the concatenated values of the node and all its child nodes. (Inherited from XmlDocument.)
Public propertyInnerXmlGets or sets the markup representing the children of the current node. (Inherited from XmlDocument.)
Public propertyIsReadOnlyGets a value indicating whether the current node is read-only. (Inherited from XmlDocument.)
Public propertyItem[String]Gets the first child element with the specified Name. (Inherited from XmlNode.)
Public propertyItem[String, String]Gets the first child element with the specified LocalName and NamespaceURI. (Inherited from XmlNode.)
Public propertyLastChildGets the last child of the node. (Inherited from XmlNode.)
Public propertyLocalNameGets the local name of the node. (Inherited from XmlDocument.)
Public propertyNameGets the qualified name of the node. (Inherited from XmlDocument.)
Public propertyNamespaceURIGets the namespace URI of this node. (Inherited from XmlNode.)
Public propertyNameTableGets the XmlNameTable associated with this implementation. (Inherited from XmlDocument.)
Public propertyNextSiblingGets the node immediately following this node. (Inherited from XmlNode.)
Public propertyNodeTypeGets the type of the current node. (Inherited from XmlDocument.)
Public propertyOuterXmlGets the markup representing this node and all its child nodes. (Inherited from XmlNode.)
Public propertyOwnerDocumentGets the XmlDocument to which the current node belongs. (Inherited from XmlDocument.)
Public propertyParentNodeGets the parent node of this node (for nodes that can have parents). (Inherited from XmlDocument.)
Public propertyPrefixGets or sets the namespace prefix of this node. (Inherited from XmlNode.)
Public propertyPreserveWhitespaceGets or sets a value indicating whether to preserve white space in element content. (Inherited from XmlDocument.)
Public propertyPreviousSiblingGets the node immediately preceding this node. (Inherited from XmlNode.)
Public propertySchemaInfoReturns the Post-Schema-Validation-Infoset (PSVI) of the node. (Inherited from XmlDocument.)
Public propertySchemasGets or sets the XmlSchemaSet object associated with this XmlDocument. (Inherited from XmlDocument.)
Public propertyValueGets or sets the value of the node. (Inherited from XmlNode.)
Public propertyXmlResolverSets the XmlResolver to use for resolving external resources. (Inherited from XmlDocument.)
Top

  NameDescription
Public methodAppendChildAdds the specified node to the end of the list of child nodes, of this node. (Inherited from XmlNode.)
Public methodCloneCreates a duplicate of this node. (Inherited from XmlNode.)
Public methodCloneNodeCreates a duplicate of the current node. (Overrides XmlDocument.CloneNode(Boolean).)
Public methodCreateAttribute(String)Creates an XmlAttribute with the specified Name. (Inherited from XmlDocument.)
Public methodCreateAttribute(String, String)Creates an XmlAttribute with the specified qualified name and NamespaceURI. (Inherited from XmlDocument.)
Public methodCreateAttribute(String, String, String)Creates an XmlAttribute with the specified Prefix, LocalName, and NamespaceURI. (Inherited from XmlDocument.)
Public methodCreateCDataSectionCreates an XmlCDataSection containing the specified data. (Inherited from XmlDocument.)
Public methodCreateCommentCreates an XmlComment containing the specified data. (Inherited from XmlDocument.)
Protected methodCreateDefaultAttributeCreates a default attribute with the specified prefix, local name and namespace URI. (Inherited from XmlDocument.)
Public methodCreateDocumentFragmentCreates an XmlDocumentFragment. (Inherited from XmlDocument.)
Public methodCreateDocumentTypeReturns a new XmlDocumentType object. (Inherited from XmlDocument.)
Public methodCreateElement(String)Creates an element with the specified name. (Inherited from XmlDocument.)
Public methodCreateElement(String, String)Creates an XmlElement with the qualified name and NamespaceURI. (Inherited from XmlDocument.)
Public methodCreateElement(String, String, String)Creates an element with the specified Prefix, LocalName, and NamespaceURI. (Overrides XmlDocument.CreateElement(String, String, String).)
Public methodCreateEntityReferenceCreates an XmlEntityReference with the specified name. XmlEntityReference nodes cannot be created for XmlDataDocument objects. Calling this method throws an exception. (Overrides XmlDocument.CreateEntityReference(String).)
Public methodCreateNavigator()Creates a new XPathNavigator object for navigating this document. (Inherited from XmlDocument.)
Protected methodCreateNavigator(XmlNode)Creates a new XPathNavigator object for navigating this document. The XPathNavigator is positioned on the node specified in the node parameter. (Overrides XmlDocument.CreateNavigator(XmlNode).)
Public methodCreateNode(String, String, String)Creates an XmlNode with the specified node type, Name, and NamespaceURI. (Inherited from XmlDocument.)
Public methodCreateNode(XmlNodeType, String, String)Creates an XmlNode with the specified XmlNodeType, Name, and NamespaceURI. (Inherited from XmlDocument.)
Public methodCreateNode(XmlNodeType, String, String, String)Creates a XmlNode with the specified XmlNodeType, Prefix, Name, and NamespaceURI. (Inherited from XmlDocument.)
Public methodCreateProcessingInstructionCreates an XmlProcessingInstruction with the specified name and data. (Inherited from XmlDocument.)
Public methodCreateSignificantWhitespaceCreates an XmlSignificantWhitespace node. (Inherited from XmlDocument.)
Public methodCreateTextNodeCreates an XmlText with the specified text. (Inherited from XmlDocument.)
Public methodCreateWhitespaceCreates an XmlWhitespace node. (Inherited from XmlDocument.)
Public methodCreateXmlDeclarationCreates an XmlDeclaration node with the specified values. (Inherited from XmlDocument.)
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetElementByIdGets the XmlElement with the specified ID. This method is not supported by the XmlDataDocument class. Calling this method throws an exception. (Overrides XmlDocument.GetElementById(String).)
Public methodGetElementFromRowRetrieves the XmlElement associated with the specified DataRow.
Public methodGetElementsByTagName(String)Returns an XmlNodeList containing a list of all descendant elements that match the specified Name. (Overrides XmlDocument.GetElementsByTagName(String).)
Public methodGetElementsByTagName(String, String)Returns an XmlNodeList containing a list of all descendant elements that match the specified LocalName and NamespaceURI. (Inherited from XmlDocument.)
Public methodGetEnumeratorProvides support for the for each style iteration over the nodes in the XmlNode. (Inherited from XmlNode.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetNamespaceOfPrefixLooks 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 methodGetPrefixOfNamespaceLooks 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 methodGetRowFromElementRetrieves the DataRow associated with the specified XmlElement.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodImportNodeImports a node from another document to the current document. (Inherited from XmlDocument.)
Public methodInsertAfterInserts the specified node immediately after the specified reference node. (Inherited from XmlNode.)
Public methodInsertBeforeInserts the specified node immediately before the specified reference node. (Inherited from XmlNode.)
Public methodLoad(Stream)Loads the XmlDataDocument from the specified stream. (Overrides XmlDocument.Load(Stream).)
Public methodLoad(String)Loads the XmlDataDocument using the specified URL. (Overrides XmlDocument.Load(String).)
Public methodLoad(TextReader)Loads the XmlDataDocument from the specified TextReader. (Overrides XmlDocument.Load(TextReader).)
Public methodLoad(XmlReader)Loads the XmlDataDocument from the specified XmlReader. (Overrides XmlDocument.Load(XmlReader).)
Public methodLoadXmlLoads the XML document from the specified string. (Inherited from XmlDocument.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodNormalizePuts 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 methodPrependChildAdds the specified node to the beginning of the list of child nodes for this node. (Inherited from XmlNode.)
Public methodReadNodeCreates an XmlNode object based on the information in the XmlReader. The reader must be positioned on a node or attribute. (Inherited from XmlDocument.)
Public methodRemoveAllRemoves all the child nodes and/or attributes of the current node. (Inherited from XmlNode.)
Public methodRemoveChildRemoves specified child node. (Inherited from XmlNode.)
Public methodReplaceChildReplaces the child node oldChild with newChild node. (Inherited from XmlNode.)
Public methodSave(Stream)Saves the XML document to the specified stream. (Inherited from XmlDocument.)
Public methodSave(String)Saves the XML document to the specified file. (Inherited from XmlDocument.)
Public methodSave(TextWriter)Saves the XML document to the specified TextWriter. (Inherited from XmlDocument.)
Public methodSave(XmlWriter)Saves the XML document to the specified XmlWriter. (Inherited from XmlDocument.)
Public methodSelectNodes(String)Selects a list of nodes matching the XPath expression. (Inherited from XmlNode.)
Public methodSelectNodes(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 methodSelectSingleNode(String)Selects the first XmlNode that matches the XPath expression. (Inherited from XmlNode.)
Public methodSelectSingleNode(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 methodSupportsTest if the DOM implementation implements a specific feature. (Inherited from XmlNode.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodValidate(ValidationEventHandler)Validates the XmlDocument against the XML Schema Definition Language (XSD) schemas contained in the Schemas property. (Inherited from XmlDocument.)
Public methodValidate(ValidationEventHandler, XmlNode)Validates the XmlNode object specified against the XML Schema Definition Language (XSD) schemas in the Schemas property. (Inherited from XmlDocument.)
Public methodWriteContentToSaves all the children of the XmlDocument node to the specified XmlWriter. (Inherited from XmlDocument.)
Public methodWriteToSaves the XmlDocument node to the specified XmlWriter. (Inherited from XmlDocument.)
Top

  NameDescription
Public eventNodeChangedOccurs when the Value of a node belonging to this document has been changed. (Inherited from XmlDocument.)
Public eventNodeChangingOccurs when the Value of a node belonging to this document is about to be changed. (Inherited from XmlDocument.)
Public eventNodeInsertedOccurs when a node belonging to this document has been inserted into another node. (Inherited from XmlDocument.)
Public eventNodeInsertingOccurs when a node belonging to this document is about to be inserted into another node. (Inherited from XmlDocument.)
Public eventNodeRemovedOccurs when a node belonging to this document has been removed from its parent. (Inherited from XmlDocument.)
Public eventNodeRemovingOccurs when a node belonging to this document is about to be removed from the document. (Inherited from XmlDocument.)
Top

  NameDescription
Explicit interface implemetationPrivate methodICloneable.CloneFor a description of this member, see XmlNode.Clone. (Inherited from XmlNode.)
Explicit interface implemetationPrivate methodIEnumerable.GetEnumeratorFor a description of this member, see XmlNode.GetEnumerator. (Inherited from XmlNode.)
Top

This class extends XmlDocument. It enables you to load either relational data or XML data and manipulate that data using the World Wide Web Consortium (W3C) Document Object Model (DOM). The DOM presents data as a hierarchy of node objects. Because XmlDataDocument implements the IXPathNavigable interface, it can also be used as the source document for the XslTransform class.

XmlDataDocument has a close affiliation with the DataSet class, which provides a relational view of the loaded XML data. Any changes made to the XmlDataDocument are reflected in the DataSet and vice versa.

To load a DataSet with XML data, use ReadXmlSchema to build a relational mapping. The XML data can then be loaded using Load or LoadXml.

To load relational data, specify the DataSet containing the relational data as the parameter in the XmlDataDocument constructor.

NoteNote

The HostProtectionAttribute attribute applied to this type or member has the following Resources property value: Synchronization. The HostProtectionAttribute does not affect desktop applications (which are typically started by double-clicking an icon, typing a command, or entering a URL in a browser). For more information, see the HostProtectionAttribute class or SQL Server Programming and Host Protection Attributes.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0
Obsolete (compiler warning) in 4

.NET Framework Client Profile

Supported in: 3.5 SP1
Obsolete (compiler warning) in 4

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.

Community Additions

ADD
Show:
© 2014 Microsoft