Name

XmlDataDocument

Synopsis

The XmlDataDocument is a marriage of XML and RDBMS technology; it is an XmlDocument-inheriting class that particularly understands ADO.NET DataSet objects. This offers a variety of opportunities to the .NET programmer — for example, a DataSet can be loaded into the XmlDataDocument, and then navigated using traditional DOM-style navigation using the XmlNode API. In fact, because XmlDataDocument also inherits the System.Xml.XPath.IXPathNavigable interface, XPath queries can be issued against the DataSet data, as well.

In order to build this relationship, construct the XmlDataDocument with the DataSet holding the data as its constructor parameter. Alternatively, use the Load() method to read in the data via an XmlReader. The resulting XML can also then be written out to another medium with the WriteTo() method.

Public Class XmlDataDocument : Inherits XmlDocument
' Public Constructors
   Public Sub New() 
   Public Sub New( ByVal dataset As System.Data.DataSet) 
' Public Instance Properties
   Public ReadOnly Property DataSet As DataSet  
' Public Instance Methods
   Overrides Public Function CloneNode(
        ByVal deep As Boolean) As XmlNode  
   Overrides Public Function CreateElement(
        ByVal prefix As String, ByVal localName As String, 
        ByVal namespaceURI As String) As XmlElement  
   Overrides Public Function CreateEntityReference(
        ByVal name As String) As XmlEntityReference  
   Overrides Public Function GetElementById(
        ByVal elemId As String) As XmlElement  
   Public Function GetElementFromRow ...

Get VB.NET Core Classes in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.