XmlSchemaSet.Reprocess Method

Note: This method is new in the .NET Framework version 2.0.

Reprocesses an XML Schema definition language (XSD) schema that already exists in the XmlSchemaSet.

Namespace: System.Xml.Schema
Assembly: System.Xml (in system.xml.dll)

public XmlSchema Reprocess (
	XmlSchema schema
public XmlSchema Reprocess (
	XmlSchema schema
public function Reprocess (
	schema : XmlSchema
) : XmlSchema



The schema to reprocess.

Return Value

An XmlSchema object if the schema is a valid schema. If the schema is not valid and a ValidationEventHandler is specified, a null reference (Nothing in Visual Basic) is returned and the appropriate validation event is raised. Otherwise, an XmlSchemaException is thrown.

Exception typeCondition


The schema is not valid.


The XmlSchema object passed as a parameter is a null reference (Nothing in Visual Basic).


The XmlSchema object passed as a parameter does not already exist in the XmlSchemaSet.

Reprocessing a schema performs all the preprocessing steps performed on a schema when the Add method is called. If the call to Reprocess is successful, the IsCompiled property is set to false.

The Reprocess method should be used after a schema in the XmlSchemaSet has been modified, after the XmlSchemaSet has performed compilation.

The following example illustrates reprocessing a schema added to the XmlSchemaSet. After the XmlSchemaSet is compiled using the Compile method, and the schema added to the XmlSchemaSet is modified, the IsCompiled property will be set to true, even though a schema in the XmlSchemaSet has been modified. Calling the Reprocess method performs all the preprocessing performed by the Add method and sets the IsCompiled property to false.

XmlSchemaSet schemaSet = new XmlSchemaSet();
XmlSchema schema = schemaSet.Add("http://www.contoso.com/books", "http://www.contoso.com/books.xsd");

XmlSchemaElement element = new XmlSchemaElement();
element.Name = "book";
element.SchemaTypeName = new XmlQualifiedName("string", "http://www.w3.org/2001/XMLSchema");


Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

.NET Compact Framework

Supported in: 2.0

Community Additions