Compare the XML document generated from DataSet and Original one
Imports System Imports System.Data Module FidelityTester Sub Main() Dim MyDS As New DataSet() MyDS.ReadXmlSchema("book.xdr") MyDS.ReadXml("book.xml") MyDS.WriteXml("Book_After.xml") End Sub End Module 'book.xdr '<?xml version = "1.0"?> '<Schema xmlns = "urn:schemas-microsoft-com:xml-data"> ' <ElementType name = "title" content = "textOnly" ' model = "closed" /> ' <ElementType name = "book" content = "eltOnly" model = "closed"> ' <element type = "title" minOccurs = "1" maxOccurs = "1" /> ' </ElementType> ' <ElementType name = "books" content = "eltOnly" model = "closed"> ' <element type = "book" minOccurs = "0" maxOccurs = "*" /> ' </ElementType> '</Schema> 'File: book.xml '<?xml version = "1.0"?> '<books xmlns = "x-schema:book.xdr"> ' <book> ' <title>C# How to Program</title> ' </book> ' <book> ' <title>Java How to Program, 4/e</title> ' </book> ' <book> ' <title>Visual Basic .NET How to Program</title> ' </book> ' <book> ' <title>Advanced Java 2 Platform How to Program</title> ' </book> ' <book> ' <title>Python How to Program</title> ' </book> '</books>