Mega Code Archive

 
Categories / VB.Net / XML
 

XmlSchemaWhiteSpaceFacet Class tepresents the World Wide Web Consortium (W3C) whiteSpace facet

Imports System Imports System.Xml Imports System.Xml.Schema Class XMLSchemaExamples     Public Shared Sub Main()         Dim schema As New XmlSchema()         Dim NameType As New XmlSchemaSimpleType()         NameType.Name = "NameType"         Dim restriction As New XmlSchemaSimpleTypeRestriction()         restriction.BaseTypeName = New XmlQualifiedName("string", "http://www.w3.org/2001/XMLSchema")         Dim whiteSpace As New XmlSchemaWhiteSpaceFacet()         whiteSpace.Value = "collapse"         restriction.Facets.Add(whiteSpace)         NameType.Content = restriction         schema.Items.Add(NameType)         Dim element As New XmlSchemaElement()         element.Name = "LastName"         element.SchemaTypeName = New XmlQualifiedName("NameType", "")         schema.Items.Add(element)     End Sub End Class