C# Класс SimpleSchemaParser.SchemaParser

The SchemaParser can parse a schema into simple element definitions. This class uses System.Xml.Schema.XmlSchemaSet to iterate over all the toplevel element and recursively parses them. The parser doesn't support xml elements occuring in multiple contexts. The first occurence of the element will be output, other occurences will be ignored.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Compile ( ) : void

Compiles the schema. Includes are assumed to be relative to the schemaPath provided. If they cannot be read, an exception will only be thrown if an element from the included resource is used. A missing file itself is ignored by the XmlSchemaSet class.

GetXmlElements ( ) : IEnumerable
SchemaParser ( string schemaPath ) : System

Приватные методы

Метод Описание
GetParticleDesc ( XmlSchemaParticle particle ) : string
ParseAttribute ( XmlSchemaAttribute attribute ) : SimpleXmlAttribute
ParseElement ( XmlSchemaElement element, bool isTopLevel = false ) : XmlQualifiedName
ParseGoupRef ( XmlSchemaGroupRef groupRef ) : RecursiveChildren

Parses xs:group ref="..." elements in the schema

ParseGroupBase ( XmlSchemaGroupBase group ) : RecursiveChildren

Parses xs:sequence and xs:choice elements in the schema

Описание методов

Compile() публичный Метод

Compiles the schema. Includes are assumed to be relative to the schemaPath provided. If they cannot be read, an exception will only be thrown if an element from the included resource is used. A missing file itself is ignored by the XmlSchemaSet class.
public Compile ( ) : void
Результат void

GetXmlElements() публичный Метод

public GetXmlElements ( ) : IEnumerable
Результат IEnumerable

SchemaParser() публичный Метод

public SchemaParser ( string schemaPath ) : System
schemaPath string
Результат System