Welcome   |   ASP.NET   |   Web Services   |   How Do I...?   |   Class Browser
  |   I want my samples in...   

How Do I...? Common Tasks QuickStart Tutorial

Go To...

How Do I...Merge Multiple Schemas into a Single Logical Schema?

The XmlSchemaSet class represents a cache of XML Schemas. It allows you to compile multiple schemas for the same target namespace into a single logical schema.

C# MultipleSchemas.exe
View Source

[This sample can be found at M:\web\users\Sites\AspnetQuickStart\v2.0\QuickStart\howto\samples\Xml\MultipleSchemas\
To build this sample, open the SDK command prompt and navigate to the above path. Build the sample using the build tool msbuild passing the solution file as the first parameter: msbuild mySample.sln. The compiled executable will be found in the sub directory \bin directory.]

This sample adds two schemas with the same target namespace to the XmlSchemaSet. When the Compile method is called, the two physical schemas are compiled to form one logical schema. The logical schema can then be used for schema validation.

		
schemaSet.Add("http://www.example.org", @"..\..\book.xsd");
schemaSet.Add("http://www.example.org", @"..\..\author.xsd");
schemaSet.Compile(); 
C#



Microsoft .NET Framework SDK QuickStart Tutorials Version 2.0
Copyright � 2005 Microsoft Corporation. All rights reserved.


Hosted by MaximumASP | Found a broken link? | Contact Us | Terms and conditions | Privacy Policy | Advertise with us
� 2000 - 2008  Mindcracker LLC. All Rights Reserved