In file ../include/rxp/XML_Parser.h:

class XML_Parser

An actual parser.

Public Methods

[more] ~XML_Parser ()
Destructor, may close input if required
[more]void track_context (bool flag)
Request that parser keep track of the currently open elements.
[more]void track_contents (bool flag)
Keep track of the content of open elements.
[more]EST_String context (int n)
Get the name of the nth enclosing element.
[more]void go ()
Run the parser.

Protected Fields

[more]XML_Parser_Class* pclass
The class to which this parser belogs.
[more]XBit current_bit
The piece of markup being processed
[more]InputSource source
Where we are reading from
[more]Entity initial_entity
The entity we started from.
[more]void* data
Arbitrary data which can beused by callbacks
[more]Parser p
The RXP parser object
[more]EST_TDeque<EST_String> p_context
If context is being tracked, this is a stack of element names

Protected Methods

[more] XML_Parser (XML_Parser_Class &parent, InputSource source, Entity initial_entity, void* data)
Creator used by XML_Parser_Class::make_parser()
[more]InputSource open (Entity ent)
Open.
[more]const char* get_error ()
Get the error message for the last error


Documentation

An actual parser. Each such instance parses just one stream which is given when the parser is created.

The behaviour of the parser is given by the class to which it belongs.

oXML_Parser_Class* pclass
The class to which this parser belogs. Defines the behaviour of the parser.

oXBit current_bit
The piece of markup being processed

oInputSource source
Where we are reading from

oEntity initial_entity
The entity we started from. May beed to be freed at the end of the parse.

ovoid* data
Arbitrary data which can beused by callbacks

oParser p
The RXP parser object

oEST_TDeque<EST_String> p_context
If context is being tracked, this is a stack of element names

o XML_Parser(XML_Parser_Class &parent, InputSource source, Entity initial_entity, void* data)
Creator used by XML_Parser_Class::make_parser()

oInputSource open(Entity ent)
Open. Asks the parser class to do the work.

oconst char* get_error()
Get the error message for the last error

o ~XML_Parser()
Destructor, may close input if required

ovoid track_context(bool flag)
Request that parser keep track of the currently open elements.

These are recorded on a atsck. Use context() to access the information.

ovoid track_contents(bool flag)
Keep track of the content of open elements.

Not yet implemented.

oEST_String context(int n)
Get the name of the nth enclosing element.

context(0) is the element we are directly inside.

ovoid go()
Run the parser.


This class has no child classes.
Friends:
class XML_Parser_Class

Alphabetic index HTML hierarchy of classes or Java


This page is part of the Edinburgh Speech Tools Library documentation
Copyright University of Edinburgh 1997
Contact: speech_tools@cstr.ed.ac.uk