Export (0) Print
Expand All

SchemaImporterExtension.ImportAnyElement Method

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

Namespace:  System.Xml.Serialization.Advanced
Assembly:  System.Xml (in System.Xml.dll)

public virtual string ImportAnyElement(
	XmlSchemaAny any,
	bool mixed,
	XmlSchemas schemas,
	XmlSchemaImporter importer,
	CodeCompileUnit compileUnit,
	CodeNamespace mainNamespace,
	CodeGenerationOptions options,
	CodeDomProvider codeProvider
)

Parameters

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

Return Value

Type: System.String
The name of the CLR type that the element maps to.

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.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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

Community Additions

ADD
Show:
© 2014 Microsoft