A fast callback-based (SAX2) XML parser. More...
Classes | |
class | Handler |
An auxiliary class required by SAX parsers. More... | |
Public Member Functions | |
Parser (String inputName, InputStream inputStream, Builder builder) | |
void | parse () throws Exception |
int | getLineNumber () |
Protected Attributes | |
String | inputName |
The name of the input to parse. | |
InputStream | inputStream |
A stream giving access to the input to parse. | |
LineNumberReader | lineNumberReader |
A reader which keeps track of the input line number. | |
Builder | builder |
The builder to use while parsing. | |
Locator | locator |
The last reported parse position in the input file. | |
Package Attributes | |
final String | parserClass = "com.jclark.xml.sax.Driver" |
The SAX parser package to use. | |
final String | xmlReaderClass = "org.apache.xerces.parsers.SAXParser" |
A fast callback-based (SAX2) XML parser.
This parser is fast in part because it is lightweight. It does not validate the input file, and therefore it also need not read a DTD for the file. It has no knowledge of the semantics of what it parses and therefore does no semantic error checking or representation building.
Semantic checking and building are performed by a separate object of class Builder
, which procedurally encodes knowledge of the document type being parsed, the document's semantic constraints, and the representation to be built for a document. hpcviewer uses a subclass of Builder
to encode the experiment file format.
Note that we and SAX both define a class named Parser
. Here the SAX class is referred to as org.xml.sax.Parser
Definition at line 52 of file Parser.java.
edu.rice.cs.hpc.data.experiment.xml.Parser.Parser | ( | String | inputName, | |
InputStream | inputStream, | |||
Builder | builder | |||
) |
Definition at line 94 of file Parser.java.
References edu.rice.cs.hpc.data.experiment.xml.Parser.lineNumberReader, and edu.rice.cs.hpc.data.experiment.xml.Builder.setParser().
int edu.rice.cs.hpc.data.experiment.xml.Parser.getLineNumber | ( | ) |
Definition at line 188 of file Parser.java.
References edu.rice.cs.hpc.data.experiment.xml.Parser.lineNumberReader.
Referenced by edu.rice.cs.hpc.data.experiment.xml.BaseExperimentBuilder.endScope(), edu.rice.cs.hpc.data.experiment.xml.Builder.error(), and edu.rice.cs.hpc.data.experiment.xml.Parser.parse().
void edu.rice.cs.hpc.data.experiment.xml.Parser.parse | ( | ) | throws Exception |
Definition at line 121 of file Parser.java.
References edu.rice.cs.hpc.data.experiment.xml.Builder.begin(), edu.rice.cs.hpc.data.experiment.xml.Parser.builder, edu.rice.cs.hpc.data.experiment.xml.Builder.end(), edu.rice.cs.hpc.data.experiment.xml.Builder.error(), edu.rice.cs.hpc.data.experiment.xml.Parser.getLineNumber(), and edu.rice.cs.hpc.data.experiment.xml.Parser.lineNumberReader.
Referenced by edu.rice.cs.hpc.data.experiment.xml.ExperimentFileXML.parse().
The builder to use while parsing.
Definition at line 66 of file Parser.java.
Referenced by edu.rice.cs.hpc.data.experiment.xml.Parser.parse().
String edu.rice.cs.hpc.data.experiment.xml.Parser.inputName [protected] |
The name of the input to parse.
Definition at line 57 of file Parser.java.
InputStream edu.rice.cs.hpc.data.experiment.xml.Parser.inputStream [protected] |
A stream giving access to the input to parse.
Definition at line 60 of file Parser.java.
LineNumberReader edu.rice.cs.hpc.data.experiment.xml.Parser.lineNumberReader [protected] |
A reader which keeps track of the input line number.
Definition at line 63 of file Parser.java.
Referenced by edu.rice.cs.hpc.data.experiment.xml.Parser.getLineNumber(), edu.rice.cs.hpc.data.experiment.xml.Parser.parse(), and edu.rice.cs.hpc.data.experiment.xml.Parser.Parser().
Locator edu.rice.cs.hpc.data.experiment.xml.Parser.locator [protected] |
The last reported parse position in the input file.
Definition at line 69 of file Parser.java.
final String edu.rice.cs.hpc.data.experiment.xml.Parser.parserClass = "com.jclark.xml.sax.Driver" [package] |
The SAX parser package to use.
Definition at line 75 of file Parser.java.
final String edu.rice.cs.hpc.data.experiment.xml.Parser.xmlReaderClass = "org.apache.xerces.parsers.SAXParser" [package] |
Definition at line 77 of file Parser.java.