Imports System
Imports System.Xml
Imports System.Xml.Schema
Class XMLSchemaExamples
Public Shared Sub Main()
Dim schema As New XmlSchema()
Dim element As New XmlSchemaElement()
schema.Items.Add(element)
element.Name = "stringElementWithAnyAttribute"
Dim complexType As New XmlSchemaComplexType()
element.SchemaType = complexType
Dim simpleContent As New XmlSchemaSimpleContent()
complexType.ContentModel = simpleContent
Dim extension As New XmlSchemaSimpleContentExtension()
simpleContent.Content = extension
extension.BaseTypeName = New XmlQualifiedName("string", "http://www.w3.org/2001/XMLSchema")
Dim anyAttribute As New XmlSchemaAnyAttribute()
extension.AnyAttribute = anyAttribute
anyAttribute.Namespace = "targetNamespace"
End Sub
End Class