C# Class HandCoded.FpML.FpMLUtility

The FpMLUtility class contains a set of methods for performing common operations on FpML document instances.
Show file Open project: formicary/fpml-toolkit-csharp

Public Methods

Method Description
Parse ( Stream stream, ValidationEventHandler eventHandler ) : XmlDocument

Parses an XML document from the given Stream passing any reported errors to the ValidationEventHandler instance.

Parse ( bool schemaOnly, Stream stream, ValidationEventHandler eventHandler ) : XmlDocument

Parses an XML document from the given Stream passing any reported errors to the ValidationEventHandler instance.

Parse ( bool schemaOnly, string xml, ValidationEventHandler eventHandler ) : XmlDocument

Parses the XML string provided passing any validation problems to the indicated ValidationEventHandler.

Parse ( string xml, ValidationEventHandler eventHandler ) : XmlDocument

Parses the XML string provided passing any validation problems to the indicated ValidationEventHandler.

ParseAndValidate ( Stream stream, RuleSet rules, ValidationEventHandler eventHandler, ValidationErrorHandler errorHandler ) : bool

Attempts to parse an XML document from a Stream and then pass it though the specified validation rule set.

ParseAndValidate ( Stream stream, ValidationEventHandler eventHandler, ValidationErrorHandler errorHandler ) : bool

Attempts to parse an XML document from a Stream and then pass it though the default FpML validation rule set.

ParseAndValidate ( bool schemaOnly, Stream stream, RuleSet rules, ValidationEventHandler eventHandler, ValidationErrorHandler errorHandler ) : bool

Attempts to parse an XML document from a Stream and then pass it though the specified validation rule set.

ParseAndValidate ( bool schemaOnly, Stream stream, ValidationEventHandler eventHandler, ValidationErrorHandler errorHandler ) : bool

Attempts to parse an XML document from a Stream and then pass it though the default FpML validation rule set.

ParseAndValidate ( bool schemaOnly, string xml, RuleSet rules, ValidationEventHandler eventHandler, ValidationErrorHandler errorHandler ) : bool

Attempts to parse an XML document from a string and then pass it through the specified validation rule set.

ParseAndValidate ( bool schemaOnly, string xml, ValidationEventHandler eventHandler, ValidationErrorHandler errorHandler ) : bool

Attempts to parse an XML document from a string and then pass it through the default FpML validation rule set.

ParseAndValidate ( string xml, RuleSet rules, ValidationEventHandler eventHandler, ValidationErrorHandler errorHandler ) : bool

Attempts to parse an XML document from a string and then pass it through the specified validation rule set.

ParseAndValidate ( string xml, ValidationEventHandler eventHandler, ValidationErrorHandler errorHandler ) : bool

Attempts to parse an XML document from a string and then pass it through the default FpML validation rule set.

Validate ( XmlDocument document, RuleSet rules, ValidationErrorHandler errorHandler ) : bool

Uses the indicated RuleSet to perform a semantic validation of the XmlDocument and reports errors (if any).

Validate ( XmlDocument document, ValidationErrorHandler errorHandler ) : bool

Uses the default FpML RuleSet to perform a semantic validation of the XmlDocument and reports errors (if any).

Private Methods

Method Description
FpMLUtility ( ) : System

Ensures no instances can be created.

Method Details

Parse() public static method

Parses an XML document from the given Stream passing any reported errors to the ValidationEventHandler instance.
public static Parse ( Stream stream, ValidationEventHandler eventHandler ) : XmlDocument
stream Stream The to process XML from.
eventHandler ValidationEventHandler A used to report parser errors.
return System.Xml.XmlDocument

Parse() public static method

Parses an XML document from the given Stream passing any reported errors to the ValidationEventHandler instance.
public static Parse ( bool schemaOnly, Stream stream, ValidationEventHandler eventHandler ) : XmlDocument
schemaOnly bool Indicates only schema based documents to be processed.
stream Stream The to process XML from.
eventHandler ValidationEventHandler A used to report parser errors.
return System.Xml.XmlDocument

Parse() public static method

Parses the XML string provided passing any validation problems to the indicated ValidationEventHandler.
public static Parse ( bool schemaOnly, string xml, ValidationEventHandler eventHandler ) : XmlDocument
schemaOnly bool Indicates only schema based documents to be processed.
xml string The XML string to be parsed.
eventHandler ValidationEventHandler A used to report parser errors.
return System.Xml.XmlDocument

Parse() public static method

Parses the XML string provided passing any validation problems to the indicated ValidationEventHandler.
public static Parse ( string xml, ValidationEventHandler eventHandler ) : XmlDocument
xml string The XML string to be parsed.
eventHandler ValidationEventHandler A used to report parser errors.
return System.Xml.XmlDocument

ParseAndValidate() public static method

Attempts to parse an XML document from a Stream and then pass it though the specified validation rule set.
public static ParseAndValidate ( Stream stream, RuleSet rules, ValidationEventHandler eventHandler, ValidationErrorHandler errorHandler ) : bool
stream Stream The to process XML from.
rules HandCoded.Validation.RuleSet The used for validation.
eventHandler ValidationEventHandler A used to report parser errors.
errorHandler ValidationErrorHandler An used to report validation errors.
return bool

ParseAndValidate() public static method

Attempts to parse an XML document from a Stream and then pass it though the default FpML validation rule set.
public static ParseAndValidate ( Stream stream, ValidationEventHandler eventHandler, ValidationErrorHandler errorHandler ) : bool
stream Stream The to process XML from.
eventHandler ValidationEventHandler A used to report parser errors.
errorHandler ValidationErrorHandler An used to report validation errors.
return bool

ParseAndValidate() public static method

Attempts to parse an XML document from a Stream and then pass it though the specified validation rule set.
public static ParseAndValidate ( bool schemaOnly, Stream stream, RuleSet rules, ValidationEventHandler eventHandler, ValidationErrorHandler errorHandler ) : bool
schemaOnly bool Indicates only schema based documents to be processed.
stream Stream The to process XML from.
rules HandCoded.Validation.RuleSet The used for validation.
eventHandler ValidationEventHandler A used to report parser errors.
errorHandler ValidationErrorHandler An used to report validation errors.
return bool

ParseAndValidate() public static method

Attempts to parse an XML document from a Stream and then pass it though the default FpML validation rule set.
public static ParseAndValidate ( bool schemaOnly, Stream stream, ValidationEventHandler eventHandler, ValidationErrorHandler errorHandler ) : bool
schemaOnly bool Indicates only schema based documents to be processed.
stream Stream The to process XML from.
eventHandler ValidationEventHandler A used to report parser errors.
errorHandler ValidationErrorHandler An used to report validation errors.
return bool

ParseAndValidate() public static method

Attempts to parse an XML document from a string and then pass it through the specified validation rule set.
public static ParseAndValidate ( bool schemaOnly, string xml, RuleSet rules, ValidationEventHandler eventHandler, ValidationErrorHandler errorHandler ) : bool
schemaOnly bool Indicates only schema based documents to be processed.
xml string The XML string to be parsed.
rules HandCoded.Validation.RuleSet The used for validation.
eventHandler ValidationEventHandler A used to report parser errors.
errorHandler ValidationErrorHandler An used to report validation errors.
return bool

ParseAndValidate() public static method

Attempts to parse an XML document from a string and then pass it through the default FpML validation rule set.
public static ParseAndValidate ( bool schemaOnly, string xml, ValidationEventHandler eventHandler, ValidationErrorHandler errorHandler ) : bool
schemaOnly bool Indicates only schema based documents to be processed.
xml string The XML string to be parsed.
eventHandler ValidationEventHandler A used to report parser errors.
errorHandler ValidationErrorHandler An used to report validation errors.
return bool

ParseAndValidate() public static method

Attempts to parse an XML document from a string and then pass it through the specified validation rule set.
public static ParseAndValidate ( string xml, RuleSet rules, ValidationEventHandler eventHandler, ValidationErrorHandler errorHandler ) : bool
xml string The XML string to be parsed.
rules HandCoded.Validation.RuleSet The used for validation.
eventHandler ValidationEventHandler A used to report parser errors.
errorHandler ValidationErrorHandler An used to report validation errors.
return bool

ParseAndValidate() public static method

Attempts to parse an XML document from a string and then pass it through the default FpML validation rule set.
public static ParseAndValidate ( string xml, ValidationEventHandler eventHandler, ValidationErrorHandler errorHandler ) : bool
xml string The XML string to be parsed.
eventHandler ValidationEventHandler A used to report parser errors.
errorHandler ValidationErrorHandler An used to report validation errors.
return bool

Validate() public static method

Uses the indicated RuleSet to perform a semantic validation of the XmlDocument and reports errors (if any).
public static Validate ( XmlDocument document, RuleSet rules, ValidationErrorHandler errorHandler ) : bool
document System.Xml.XmlDocument The to be validated.
rules HandCoded.Validation.RuleSet The to use.
errorHandler ValidationErrorHandler The used to report issues.
return bool

Validate() public static method

Uses the default FpML RuleSet to perform a semantic validation of the XmlDocument and reports errors (if any).
public static Validate ( XmlDocument document, ValidationErrorHandler errorHandler ) : bool
document System.Xml.XmlDocument The to be validated.
errorHandler ValidationErrorHandler The used to report issues.
return bool