C# Класс HandCoded.Xml.XmlUtility

A collection of utility functions for traversing the structure of a DOM tree represented by a XmlDocument and its constitutent XmlNode instances.
Показать файл Открыть проект

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

Метод Описание
DumpNode ( XmlNode node ) : void

Produces a detailed dump of the given XmlNode instance and its descendents on the console output stream.

DumpNode ( XmlNode node, TextWriter writer ) : void

Produces a detailed dump of the given XmlNode instance and its descendents via the indicated TextWriter.

NonValidatingParse ( Stream stream ) : XmlDocument

Performs a non-validating parse of the indicated XML Stream discarding any errors generated.

NonValidatingParse ( string xml ) : XmlDocument

Performs a non-validating parse of the indicated XML String discarding any errors generated.

ValidatingParse ( int grammer, Stream stream, XmlSchemaSet schemas, XmlResolver resolver, ValidationEventHandler eventHandler ) : XmlDocument

Performs a validating parse of the indicated XML string using the most optimal technique given the mode. If the type of grammar is unknown then a non-validating parse is done first and the document inspected to see if it references a DOCTYPE.

ValidatingParse ( int grammer, string xml, XmlSchemaSet schemas, XmlResolver resolver, ValidationEventHandler eventHandler ) : XmlDocument

Performs a validating parse of the indicated XML string using the most optimal technique given the mode. If the type of grammar is unknown then a non-validating parse is done first and the document inspected to see if it references a DOCTYPE.

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

Метод Описание
DumpNode ( XmlNode node, TextWriter writer, int indent ) : void

Recursively dumps out an XmlNode and its descendents to the indicated TextWriter in a simple indented style.

XmlUtility ( ) : System

Ensures no instances can be constructed.

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

DumpNode() публичный статический Метод

Produces a detailed dump of the given XmlNode instance and its descendents on the console output stream.
public static DumpNode ( XmlNode node ) : void
node System.Xml.XmlNode The to be dumped.
Результат void

DumpNode() публичный статический Метод

Produces a detailed dump of the given XmlNode instance and its descendents via the indicated TextWriter.
public static DumpNode ( XmlNode node, TextWriter writer ) : void
node System.Xml.XmlNode The to be dumped.
writer System.IO.TextWriter The to use for output.
Результат void

NonValidatingParse() публичный статический Метод

Performs a non-validating parse of the indicated XML Stream discarding any errors generated.
public static NonValidatingParse ( Stream stream ) : XmlDocument
stream Stream The XML to be processed.
Результат System.Xml.XmlDocument

NonValidatingParse() публичный статический Метод

Performs a non-validating parse of the indicated XML String discarding any errors generated.
public static NonValidatingParse ( string xml ) : XmlDocument
xml string The XML to be processed.
Результат System.Xml.XmlDocument

ValidatingParse() публичный статический Метод

Performs a validating parse of the indicated XML string using the most optimal technique given the mode. If the type of grammar is unknown then a non-validating parse is done first and the document inspected to see if it references a DOCTYPE.
public static ValidatingParse ( int grammer, Stream stream, XmlSchemaSet schemas, XmlResolver resolver, ValidationEventHandler eventHandler ) : XmlDocument
grammer int Indicates only schema based documents to be processed.
stream Stream The XML to be processed.
schemas System.Xml.Schema.XmlSchemaSet The collection of cached schemas for validation
resolver System.Xml.XmlResolver The used to locate DTDs.
eventHandler ValidationEventHandler The used to report parse errors
Результат System.Xml.XmlDocument

ValidatingParse() публичный статический Метод

Performs a validating parse of the indicated XML string using the most optimal technique given the mode. If the type of grammar is unknown then a non-validating parse is done first and the document inspected to see if it references a DOCTYPE.
public static ValidatingParse ( int grammer, string xml, XmlSchemaSet schemas, XmlResolver resolver, ValidationEventHandler eventHandler ) : XmlDocument
grammer int Indicates only schema based documents to be processed.
xml string The XML to be processed.
schemas System.Xml.Schema.XmlSchemaSet The collection of cached schemas for validation
resolver System.Xml.XmlResolver The used to locate DTDs.
eventHandler ValidationEventHandler The used to report parse errors
Результат System.Xml.XmlDocument