C# Class 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.
ファイルを表示 Open project: formicary/fpml-toolkit-csharp

Public Methods

Method Description
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.

Private Methods

Method Description
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.

Method Details

DumpNode() public static method

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.
return void

DumpNode() public static method

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.
return void

NonValidatingParse() public static method

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.
return System.Xml.XmlDocument

NonValidatingParse() public static method

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.
return System.Xml.XmlDocument

ValidatingParse() public static method

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
return System.Xml.XmlDocument

ValidatingParse() public static method

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
return System.Xml.XmlDocument