System.Xml.Serialization.Advanced.SchemaImporterExtension.ImportAnyElement Method

Handles the importation of the <xsd:any> elements in the schema.

Syntax

public virtual string ImportAnyElement (System.Xml.Schema.XmlSchemaAny any, bool mixed, System.Xml.Serialization.XmlSchemas schemas, System.Xml.Serialization.XmlSchemaImporter importer, System.CodeDom.CodeCompileUnit compileUnit, System.CodeDom.CodeNamespace mainNamespace, System.Xml.Serialization.CodeGenerationOptions options, System.CodeDom.Compiler.CodeDomProvider codeProvider)

Parameters

any
An System.Xml.Schema.XmlSchemaAny that represents the xsd:any element found in the XML Schema Document (XSD).
mixed
A bool that indicates whether the XSD complex attribute has been set to "mixed". true, if the attribute has been set to mixed, otherwise false.
schemas
An System.Xml.Serialization.XmlSchemas that contains the collection of schemas found in the XSD.
importer
The System.Xml.Serialization.XmlSchemaImporter that is the importer being used.
compileUnit
A System.CodeDom.CodeCompileUnit to which you can add CodeDOM structures to generate alternative code for the XSD.
mainNamespace
A System.CodeDom.CodeNamespace that represents the current namespace for the element.
options
A System.Xml.Serialization.CodeGenerationOptions for the setting options on the code compiler.
codeProvider
A System.CodeDom.Compiler.CodeDomProvider that is the CodeDOM provider used to generate the new code.

Returns

The name of the CLR type that the element maps to.

Remarks

In order to control the generation of the code, you must use the classes found in the System.CodeDom namespace. For more information, see Using the CodeDOM and CodeDOM Quick Reference.

Requirements

Namespace: System.Xml.Serialization.Advanced
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0