Mega Code Archive

 
Categories / VB.Net / XML
 

XmlSchemaAppInfo Class represents the World Wide Web Consortium (W3C) appinfo element

Option Explicit On Option Strict On 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 = "State"         Dim annNorthwestStates As New XmlSchemaAnnotation()         element.Annotation = annNorthwestStates         Dim docNorthwestStates As New XmlSchemaDocumentation()         annNorthwestStates.Items.Add(docNorthwestStates)         docNorthwestStates.Markup = TextToNodeArray("State Name")         Dim appInfo As New XmlSchemaAppInfo()         annNorthwestStates.Items.Add(appInfo)         appInfo.Markup = TextToNodeArray("Application Information")     End Sub     Public Shared Function TextToNodeArray(ByVal text As String) As XmlNode()         Dim doc As New XmlDocument()         Return New XmlNode(0) {doc.CreateTextNode(text)}     End Function End Class