本文整理汇总了VB.NET中System.Xml.Schema.XmlSchemaComplexType.Particle属性的典型用法代码示例。如果您正苦于以下问题:VB.NET XmlSchemaComplexType.Particle属性的具体用法?VB.NET XmlSchemaComplexType.Particle怎么用?VB.NET XmlSchemaComplexType.Particle使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类System.Xml.Schema.XmlSchemaComplexType
的用法示例。
在下文中一共展示了XmlSchemaComplexType.Particle属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: MainClass
' 导入命名空间
Imports System
Imports System.Xml
Imports System.Xml.Schema
Imports System.IO
Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.Collections
Imports System.Data
Imports System.Windows.Forms
Public Class MainClass
Shared Sub Main()
Dim Schema As XmlSchema = New XmlSchema()
Dim ElementBook As New XmlSchemaElement()
Schema.Items.Add(ElementBook)
ElementBook.Name = "Book"
Dim ComplexType As New XmlSchemaComplexType()
ElementBook.SchemaType = ComplexType
Dim Sequence As New XmlSchemaSequence()
ComplexType.Particle = Sequence
Dim ElementTitle As New XmlSchemaElement()
ElementTitle.Name = "Title"
ElementTitle.SchemaTypeName = New XmlQualifiedName("string", _
"http://www.w3.org/2001/XMLSchema")
Dim ElementPublisher As New XmlSchemaElement()
ElementPublisher.Name = "Publisher"
ElementPublisher.SchemaTypeName = New XmlQualifiedName("string", _
"http://www.w3.org/2001/XMLSchema")
Sequence.Items.Add(ElementTitle)
Sequence.Items.Add(ElementPublisher)
Schema.Compile(New ValidationEventHandler(AddressOf ValidationHandler))
Schema.Write(Console.Out)
End Sub
Shared Sub ValidationHandler(ByVal sender As Object, _
ByVal args As ValidationEventArgs)
Console.WriteLine("Schema Validation Failed.")
Console.WriteLine(args.Message)
End Sub
End Class