System.Data [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00] 1.0.3300.0 1.0.5000.0 2.0.0.0 Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details. System.Xml.XmlDocument

This class extends . 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 interface, it can also be used as the source document for the 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 to build a relational mapping. The XML data can then be loaded using or .

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

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

- Constructor

  An empty is created and associated with the XmlDataDocument.

  Initializes a new instance of the class.

  1.0.5000.0
  2.0.0.0
- Constructor

  The XmlDataDocument is synchronized with the specified DataSet. Any data in the DataSet is immediately available through the XmlDataDocument. Any changes in the DataSet are propagated in the XmlDataDocument. Any changes made in the XmlDataDocument, provided they match the DataSet schema, are propagated in the DataSet.

  Initializes a new instance of the class with the specified .

  The DataSet to load into XmlDataDocument.
  1.0.5000.0
  2.0.0.0
- Method
  System.Xml.XmlNode ``

  Cloning the XmlDataDocument also clones the schema.

  If is set to false, the cloned DataSet has no data; that is, no rows.

  If is set to true, the cloned DataSet is set with the schema and then populated with the data.

  See in the XmlNode class to see a table describing how this method behaves with each of the different node types.

  Creates a duplicate of the current node.

  The cloned node.

  true to recursively clone the subtree under the specified node; false to clone only the node itself. 1.0.5000.0 2.0.0.0
- Method
  System.Xml.XmlElement `` `` ``

  Note to Inheritors If you overload this function, it cannot be used for extensibility. Instead, you can return an element created by the base class, in this case, XmlDataDocument. See the following example.

  `class MyXmlDataDocument : XmlDataDocument { public override XmlElement CreateElement(string prefix, string localName, string nsURI) { //Ensure we are returning the base class implementation of element. XmlElement e = base.CreateElement(prefix, localName, nsURI); //Add additional code here. return e; //Return the element created by XmlDataDocument. } }`

  Creates an element with the specified , , and .

  A new .

  The prefix of the new element. If String.Empty or null, there is no prefix. The local name of the new element. The namespace Uniform Resource Identifier (URI) of the new element. If String.Empty or null, there is no namespaceURI. 1.0.5000.0 2.0.0.0
- Method
  System.Xml.XmlEntityReference ``

  nodes cannot be created for objects. Calling this method throws an exception.

  Creates an with the specified name.

  An with the specified name.

  The name of the entity reference. 1.0.5000.0 2.0.0.0
- Method
  System.Xml.XPath.XPathNavigator ``

  The XPathNavigator provides read-only, random access to data. Because it is optimized for XSLT transformations, it provides performance benefits when used as an input mechanism to the method.

  Creates a new object for navigating this document. The XPathNavigator is positioned on the node specified in the parameter.

  An XPathNavigator used to navigate the document.

  The you want the navigator initially positioned on. 1.0.5000.0 2.0.0.0
- Property
  System.Data.DataSet To be added: an object of type 'Data.DataSet'

  The DataSet enables you to access the data in the XmlDataDocument using a relational model. This means that you can handle the data as tables and views, rows and columns, relations, and so on. Changes made in the DataSet are immediately visible in the XmlDataDocument.

  Gets a that provides a relational representation of the data in the XmlDataDocument.

  1.0.5000.0
  2.0.0.0
- Method
  System.Xml.XmlElement ``

  This method is not supported by the class.

  Gets the with the specified ID. This method is not supported by the class. Calling this method throws an exception.

  An with the specified ID.

  The attribute ID to match. 1.0.5000.0 2.0.0.0
- Method
  System.Xml.XmlElement `` To be added

  Retrieves the associated with the specified .

  The XmlElement containing a representation of the specified DataRow.

  The DataRow whose associated XmlElement you want to retrieve. 1.0.5000.0 2.0.0.0
- Method
  System.Data.DataRow `` To be added

  Retrieves the associated with the specified .

  The DataRow containing a representation of the XmlElement; null if there is no DataRow associated with the XmlElement.

  The XmlElement whose associated DataRow you want to retrieve. 1.0.5000.0 2.0.0.0
- Method
  System.Void ``

  XmlDataDocument does not support creating entity references. If the data includes entity references, the Load method resolves and expands any entity references.

  In order to view the XML data relationally, you must first specify a schema to use for data mapping. This can be done either by calling the method or by creating the tables and columns within the DataSet manually. This step must be done before calling Load.

  Loads the XmlDataDocument from the specified stream.

  The stream containing the XML document to load. 1.0.5000.0 2.0.0.0
- Method
  System.Void ``

  XmlDataDocument does not support creating entity references. If the data includes entity references, the Load method resolves and expands any entity references.

  In order to view the XML data relationally, you must first specify a schema to use for data mapping. This can be done either by calling the method or by creating the tables and columns within the DataSet manually. This step must be done before calling Load.

  Loads the XmlDataDocument from the specified .

  The TextReader used to feed the XML data into the document. 1.0.5000.0 2.0.0.0
- Method
  System.Void ``

  XmlDataDocument does not support creating entity references. If the data includes entity references, the Load method resolves and expands any entity references.

  In order to view the XML data relationally, you must first specify a schema to use for data mapping. This can be done either by calling the method or by creating the tables and columns within the DataSet manually. This step must be done before calling Load.

  Loads the XmlDataDocument using the specified URL.

  The URL of the file containing the XML document to load. 1.0.5000.0 2.0.0.0
- Method
  System.Void ``

  XmlDataDocument does not support creating entity references. If the data source contains entity references, you must create an with the property set to EntityHandling.ExpandEntities (this is the default behavior) and pass the XmlValidatingReader to the Load method. If you do not use an XmlValidatingReader, the Load method throws an exception.

  The Load method always preserves significant white space. The property determines whether or not white space is preserved. The default is false, white space is not preserved.

  If the reader is in the initial state (that is, ReadState=ReadState.Initial), Load consumes the entire contents of the reader and builds the DOM from what it finds.

  If the reader is already positioned on some node at depth "n", then this method loads that node and all subsequent siblings up to the end tag that closes depth "n". This has the following results.

  If the current node and its following siblings look similar to the following:

  `<!--comment--><element1>one</element1><element2>two</element2>`

  Load throws an exception, because a document cannot have two root-level elements. If the current node and its following siblings look similar to the following:

  `<!--comment--><?process instruction?><!--comment--></endtag>`

  Load will succeed; however, you will have an incomplete DOM tree, because there is no root-level element. You have to add a root-level element before you save the document; otherwise, the method throws an exception.

  If the reader is positioned on a leaf node that is invalid for the root level of a document (for example, a white space or attribute node), the reader continues to read until it is positioned on a node that can be used for the root. The document begins loading at this point.

  Loads the XmlDataDocument from the specified .

  The XmlReader containing the XML document to load. 1.0.5000.0 2.0.0.0