C# Class SWFProcessing.Swiffotron.Processor.XMLHelper

Afficher le fichier Open project: WeeWorld/Swiffotron Class Usage Examples

Méthodes publiques

Méthode Description
ColorAttribute ( XPathNavigator nav, string name ) : Color?

Gets an HTML colour attribute value from an XML node

CreateValidationSettings ( string schemaName ) : XmlReaderSettings

For a given schema name (Named resource) this loads the schema XML and creates an XmlReaderSettings object which can be used to validate any XML read by the Swiffotron. This is called in the static initialiser.

IntegerAttribute ( XPathNavigator nav, string name ) : int?

Gets an integer attribute value from an XML node

LoadConfigurationXML ( Stream configXml ) : void

Loads a swiffotron config XML file, validates it and sets the current namespace manager so that we can do XPath queries in the 'con' namespace.

LoadSwiffotronXML ( Stream swiffotronXml ) : void

Loads a swiffotron job XML file, validates it and sets the current namespace manager so that we can do XPath queries in the 'swf' namespace.

MoveToFirstChildElement ( XPathNavigator nav ) : void

Convenience method to move a navigator to the first child element, rather than first child node, which could be text or something.

Select ( XPathNavigator top, string path ) : XPathNodeIterator
Select ( string path ) : XPathNodeIterator
SelectBoolean ( string path, bool defaultValue = null ) : bool
SelectChildren ( XPathNavigator top, string path ) : XPathNodeIterator
SelectNode ( XPathNavigator top, string path ) : XPathNavigator
SelectNode ( string path ) : XPathNavigator
SelectString ( string path, string defaultValue = null ) : string
SetContext ( SwiffotronContext ctx ) : void
SwfTagFromRef ( XPathNavigator referee ) : XPathNavigator

Find a swf xml node by a reference

TransformTagToMatrix ( XPathNavigator transform ) : Matrix

Creates a new position matrix from an XML declaration of one.

XMLHelper ( ) : System

Method Details

ColorAttribute() public méthode

Gets an HTML colour attribute value from an XML node
public ColorAttribute ( XPathNavigator nav, string name ) : Color?
nav System.Xml.XPath.XPathNavigator A pointer to the node
name string The attribute to get
Résultat Color?

CreateValidationSettings() public static méthode

For a given schema name (Named resource) this loads the schema XML and creates an XmlReaderSettings object which can be used to validate any XML read by the Swiffotron. This is called in the static initialiser.
public static CreateValidationSettings ( string schemaName ) : XmlReaderSettings
schemaName string Named resource which is an XSD file.
Résultat System.Xml.XmlReaderSettings

IntegerAttribute() public méthode

Gets an integer attribute value from an XML node
public IntegerAttribute ( XPathNavigator nav, string name ) : int?
nav System.Xml.XPath.XPathNavigator A pointer to the node
name string The attribute to get
Résultat int?

LoadConfigurationXML() public méthode

Loads a swiffotron config XML file, validates it and sets the current namespace manager so that we can do XPath queries in the 'con' namespace.
public LoadConfigurationXML ( Stream configXml ) : void
configXml Stream
Résultat void

LoadSwiffotronXML() public méthode

Loads a swiffotron job XML file, validates it and sets the current namespace manager so that we can do XPath queries in the 'swf' namespace.
public LoadSwiffotronXML ( Stream swiffotronXml ) : void
swiffotronXml Stream A stream feeding XML data.
Résultat void

MoveToFirstChildElement() public méthode

Convenience method to move a navigator to the first child element, rather than first child node, which could be text or something.
public MoveToFirstChildElement ( XPathNavigator nav ) : void
nav System.Xml.XPath.XPathNavigator The navigator to move
Résultat void

Select() public méthode

public Select ( XPathNavigator top, string path ) : XPathNodeIterator
top System.Xml.XPath.XPathNavigator
path string
Résultat System.Xml.XPath.XPathNodeIterator

Select() public méthode

public Select ( string path ) : XPathNodeIterator
path string
Résultat System.Xml.XPath.XPathNodeIterator

SelectBoolean() public méthode

public SelectBoolean ( string path, bool defaultValue = null ) : bool
path string
defaultValue bool
Résultat bool

SelectChildren() public méthode

public SelectChildren ( XPathNavigator top, string path ) : XPathNodeIterator
top System.Xml.XPath.XPathNavigator
path string
Résultat System.Xml.XPath.XPathNodeIterator

SelectNode() public méthode

public SelectNode ( XPathNavigator top, string path ) : XPathNavigator
top System.Xml.XPath.XPathNavigator
path string
Résultat System.Xml.XPath.XPathNavigator

SelectNode() public méthode

public SelectNode ( string path ) : XPathNavigator
path string
Résultat System.Xml.XPath.XPathNavigator

SelectString() public méthode

public SelectString ( string path, string defaultValue = null ) : string
path string
defaultValue string
Résultat string

SetContext() public méthode

public SetContext ( SwiffotronContext ctx ) : void
ctx SwiffotronContext
Résultat void

SwfTagFromRef() public méthode

Find a swf xml node by a reference
public SwfTagFromRef ( XPathNavigator referee ) : XPathNavigator
referee System.Xml.XPath.XPathNavigator A movieclip, or instance tag
Résultat System.Xml.XPath.XPathNavigator

TransformTagToMatrix() public méthode

Creates a new position matrix from an XML declaration of one.
public TransformTagToMatrix ( XPathNavigator transform ) : Matrix
transform XPathNavigator The navigator pointing to the XML transform element.
Résultat Matrix

XMLHelper() public méthode

public XMLHelper ( ) : System
Résultat System