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

## class XML_Parser

> An actual parser.

### Public Methods

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

### Protected Fields

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

### Protected Methods

  | XML_Parser (XML_Parser_Class &parent, InputSource source, Entity initial_entity, void* data) Creator used by XML_Parser_Class::make_parser()
  InputSource | open (Entity ent) Open.
  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.

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

`XBit current_bit`
  The piece of markup being processed

`InputSource source`
  Where we are reading from

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

`void* data`
  Arbitrary data which can beused by callbacks

`Parser p`
  The RXP parser object

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

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

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

`const char* get_error()`
  Get the error message for the last error

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

`void 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.

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

  Not yet implemented.

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

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

`void 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