Public Member Functions | |
BatchFileParser (BatchSetup oBatchSetup) | |
Constructor. | |
void | startElement (java.lang.String sURI, java.lang.String sLocalName, java.lang.String sQName, Attributes oAttributes) throws SAXException |
Function called when an opening tag is encountered. | |
void | characters (char[] p_cCh, int iStart, int iLength) throws SAXException |
Reads character data from the XML file. | |
void | endElement (java.lang.String sURI, java.lang.String sLocalName, java.lang.String sQName) throws SAXException |
Called at the end of an XML tag. | |
Private Attributes | |
BatchSetup | m_oBatchSetup |
Object to transfer the collected parameter files to. | |
StringBuffer | m_sBuf = new StringBuffer() |
String buffer to collect data in our parser. | |
String | m_sParFile |
Parameter file value. | |
int | m_iNumTimesToRun |
Number of times to run a parameter file. |
Copyright: Copyright (c) Charles D. Canham 2005
Company: Institute of Ecosystem Studies
|
Constructor.
|
|
Reads character data from the XML file. The data is appended to the string buffer. This is done because, according to the SAX parser specs, it is free to call this function multiple times per tag if it wants. So this function collects the data into a single buffer.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) May 17, 2004: Fixed a bug - put in trimming of spaces when spaces is all there is (LEM) |
|
Called at the end of an XML tag. If this is a parameter file name tag, this stashes the value in m_sBuf into m_sParFile. If this is a number-of- times-to-run tag, this converts the value in m_sBuf into an integer and stashes it in m_iNumTimesToRun. If this is the end of a parameter file couplet, then this passes the accumulated data on to the BatchSetup object.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |
|
Function called when an opening tag is encountered. This initializes our StringBuffer to get it ready to hold the tag's character data.
Edit history: ------------------ April 28, 2004: Submitted in beta version (LEM) |