XmlSchemaElement element = new XmlSchemaElement(); element.Name = "example"; element.SchemaType = new XmlSchemaSimpleType(); element.SchemaType.DataType = new XmlSchemaString(); element.MinOccurs = 1; element.MaxOccurs = 10;This example creates an XmlSchemaElement object called "example" with a data type of XmlSchemaString. It is restricted to a minimum of 1 occurrence and a maximum of 10 occurrences. Package library: System.Xml.Schema.