Transfer version 1.1

transfer.com.io
Class XMLFileReader

WEB-INF.cftags.component
        extended by transfer.com.io.XMLFileReader

public class XMLFileReader
extends WEB-INF.cftags.component

Reads XML files and performs operations on them


Constructor Summary
init(string path, string xsd)
          Constructor
 
Method Summary
private void addPath(string path)
          add a path to the path list
 void addXML(string path, [boolean overWrite='false'])
          adds some XML to the reader
private void executeIncludes(xml xml)
          find all the includes in this file, and include them
 string getPathList()
private array getXMLCollection()
private string getXSD()
 array search(string xpath)
          Searches the xml via an xpath
private void setPathList(string pathList)
private void setXMLCollection(array XMLCollection)
private void setXSD(string XSD)
private any throw(string type, string message, [string detail=''])
          Throws an Exception
private void validate(xml xml, string xmlPath)
          validates some XML, and handles the error
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init(string path, string xsd)
Constructor

Parameters:
path - Absolute path to the file
xsd - the path to the xml shema file to validate against
Method Detail

addPath

private void addPath(string path)
add a path to the path list

Parameters:
path - the path to add

addXML

public void addXML(string path, [boolean overWrite='false'])
adds some XML to the reader

Parameters:
path - the path to the XML to be read in and added
overWrite - whether or not overwrite the previous set of configurations

executeIncludes

private void executeIncludes(xml xml)
find all the includes in this file, and include them

Parameters:
xml - the xml to validate

getPathList

public string getPathList()


getXMLCollection

private array getXMLCollection()


getXSD

private string getXSD()


search

public array search(string xpath)
Searches the xml via an xpath

Parameters:
xpath - The xpath to search under

setPathList

private void setPathList(string pathList)

Parameters:
pathList

setXMLCollection

private void setXMLCollection(array XMLCollection)

Parameters:
XMLCollection

setXSD

private void setXSD(string XSD)

Parameters:
XSD

throw

private any throw(string type, string message, [string detail=''])
Throws an Exception

Parameters:
type - The type of exception
message - The message to accompany the exception
detail - The detail message for the exception

validate

private void validate(xml xml, string xmlPath)
validates some XML, and handles the error

Parameters:
xml - the xml to validate
xmlPath - the path to the xml

Transfer version 1.1