How Do I...Infer an XML Schema?
This sample illustrates how to infer an XML schema from a given XML document by using the XmlSchemaInference class.
An XmlSchemaInference object is used to infer an XML schema from a particular XML document, and then adds the inferred schema
to an XmlSchemaSet object. The inferred schema is further refined by using schemas inferred from additional XML documents.
VB XmlSchemaInference.exe
The following code creates the XmlSchemaInference and XmlSchemaSet objects.
Dim infer As New XmlSchemaInference()
Dim sc As New XmlSchemaSet()
VB
The following code infers an XML schema from an XML document.
sc = infer.InferSchema(new XmlTextReader("sample.xml"))
VB
Microsoft .NET Framework SDK QuickStart Tutorials Version 2.0
Copyright � 2005 Microsoft Corporation. All rights reserved.
|