edu.rice.cs.hpc.data.experiment.xml.Parser Class Reference

A fast callback-based (SAX2) XML parser. More...

Collaboration diagram for edu.rice.cs.hpc.data.experiment.xml.Parser:
Collaboration graph
[legend]

List of all members.

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"

Detailed Description

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

See also:
edu.rice.cs.hpc.data.experiment.xml.Builder.Builder
edu.rice.cs.hpc.data.experiment.xml.Builder.ExperimentBuilder

Definition at line 52 of file Parser.java.


Constructor & Destructor Documentation

edu.rice.cs.hpc.data.experiment.xml.Parser.Parser ( String  inputName,
InputStream  inputStream,
Builder  builder 
)

Member Function Documentation

int edu.rice.cs.hpc.data.experiment.xml.Parser.getLineNumber (  ) 
void edu.rice.cs.hpc.data.experiment.xml.Parser.parse (  )  throws Exception

Member Data Documentation

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().

The name of the input to parse.

Definition at line 57 of file Parser.java.

A stream giving access to the input to parse.

Definition at line 60 of file Parser.java.

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.


The documentation for this class was generated from the following file:

Generated on 5 May 2015 for HPCVIEWER by  doxygen 1.6.1