BizTalk Utilities CV ,   Jobs ,   Code library  
 
Home Page
System.XML
System.Xml.XmlConvert Class
System.Xml.XmlComment Class
System.Xml.XmlCharacterData Class
System.Xml.XmlCDataSection Class
System.Xml.XmlAttributeCollection Class
System.Xml.XmlAttribute Class
<< SQL XML
Uncategorized >>

By :Mark Wilson
I am the creator of TopXML. I am available for international and local (Australia) contracts. I am a Solution Architect/Business Analyst. I have worked in IT in several countries (NZ, Australia, South Africa, UK) building and training teams for government and very large non-governmental organizations. I am ex-Microsoft Consulting Services. I wrote the first book on Microsoft XML published in 2000 called XML Programming with VB and ASP. Most recently I have been building tools for the SEO industry. Ask me for a 37 point SEO health-checkup for your website.
First posted :03/24/2008
Times viewed :362

 

The System.Xml.XmlDataDocument Class

Supported Versions

.NET Framework 1.0, 1.1, 1.2

Public Members

Bold members are covered in the sample code.

Public Properties

Public Methods

Attributes

AppendChild

BaseURI

Clone

ChildNodes

CloneNode

DataSet

CreateAttribute

DocumentElement

CreateCDataSection

DocumentType

CreateComment

FirstChild

CreateDocumentFragment

HasChildNodes

CreateDocumentType

Implementation

CreateElement

InnerText

CreateEntityReference

InnerXml

CreateNavigator

IsReadOnly

CreateNode

Item

CreateProcessingInstruction

LastChild

CreateSignificantWhitespace

LocalName

CreateTextNode

Name

CreateWhitespace

NamespaceURI

CreateXmlDeclaration

NameTable

Equals

NextSibling

GetElementById

NodeType

GetElementFromRow

OuterXml

GetElementsByTagName

OwnerDocument

GetEnumerator

ParentNode

GetHashCode

Prefix

GetNamespaceOfPrefix

PreserveWhitespace

GetPrefixOfNamespace

PreviousSibling

GetRowFromElement

Value

GetType

XmlResolver

ImportNode

InsertAfter

InsertBefore

Load

LoadXml

Normalize

PrependChild

RemoveAll

RemoveChild

ReplaceChild

Save

SelectNodes

SelectSingleNode

Supports

ToString

WriteContentTo

WriteTo

Overview

Using this class you can create an implementation of the parent XmlDocument class that is capable of representing data in both a standard XML tree format, as well as a relational DataSet format. In fact, the XMLDataSet class can be related to a System.Data.DataSet, allowing the same body of data to be manipulated using relational or XML DOM-compliant APIs.

Example (VB.NET): How to read in and retrieve an XML document from a DataSet and an XmlDataSet.

In this example, we create two XmlTextReaders that load the same XML document. The contents of the first XmlTextReader are read into a DataSet table and then displayed in their native XML format. The contents of the second XmlTextReader are loaded into an XmlDataDocument and then displayed.

        Dim objDataSet As New System.Data.DataSet

        Dim objTable As New System.Data.DataTable

        Dim objReader1 As New System.Xml.XmlTextReader("C:\sample.xml")

        Dim objReader2 As New System.Xml.XmlTextReader("C:\sample.xml")

        Dim objStringReader As System.IO.TextReader

        Dim objXmlDataDocument As New System.Xml.XmlDataDocument

        Dim strValues As String

        objDataSet.DataSetName = "NewSample"

        objTable.TableName = "NewTable"

        objTable.Columns.Add("NewColumn", Type.GetType("System.String"))

        objDataSet.Tables.Add(objTable)

        objDataSet.ReadXml(objReader1)

        TextBox1.Text = "DataSet Output:" & CrLf & objDataSet.GetXml

        objDataSet = Nothing

        objXmlDataDocument.Load(objReader2)

        TextBox1.Text &= CrLf & "XmlDataDocument Output:" & CrLf & objXmlDataDocument.OuterXml


Rate this article on a scale of 1 to 10

Your vote :  


 

Recent Jobs

Software Developers Needed in Charl
Sr. Software Engineer - Analytics
Immediate Mainframe openings for Ch
Immediate TANDEM-TAL openings for C
Immediate ASP.NET/C# Openings for C

View all Jobs (Add yours)
View all CV (Add yours)



online fax
swimming pool contractor
United Kingdom Conference Calling
water softener
Teleconference
Host Department NOLIMIT Web Hosting
MSN
sunglasses


    Email TopXML  

Front Page Daily Stuff TopXML Forum XML blogs XML Newsgroups BizTalk Biztalk Utilities Biztalk Utilities Tutorial B2B SAP XML Microsoft .NET Dotnet System XML Soapformatter SQLXML XMLserializer XQuery PHP PHP SimpleXML PHP XML Dom PHP XML RPC PHP XSLT Java Java Java XML Xalan Microsoft ASP ASP Schemas XML SQL Server XML XMLDom XSL XSL Tutorial XSLT Stylesheets General Javascript CSS XHTML WAP