Edinburgh Speech Tools  2.4-release
 All Classes Functions Variables Typedefs Enumerations Enumerator Friends Pages
XML_Parser Class Reference

#include <include/rxp/XML_Parser.h>

Collaboration diagram for XML_Parser:

Public Member Functions

 ~XML_Parser ()
 Destructor, may close input if required.
 
void track_context (bool flag)
 
void track_contents (bool flag)
 
EST_String context (int n)
 
void go ()
 Run the parser.
 

Protected Member Functions

 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.
 

Protected Attributes

XML_Parser_Classpclass
 
XBit current_bit
 The piece of markup being processed.
 
InputSource source
 Where we are reading from.
 
Entity initial_entity
 
void * data
 Arbitrary data which can be used by callbacks.
 
Parser p
 The RXP parser object.
 
EST_TDeque< EST_Stringp_context
 If context is being tracked, this is a stack of element names.
 

Friends

class XML_Parser_Class
 

Detailed Description

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.

Definition at line 240 of file XML_Parser.h.

Member Function Documentation

void XML_Parser::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.

Definition at line 383 of file XML_Parser.cc.

void XML_Parser::track_contents ( bool  flag)

Keep track of the content of open elements.

Not yet implemented.

Definition at line 388 of file XML_Parser.cc.

EST_String XML_Parser::context ( int  n)

Get the name of the nth enclosing element.

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

Definition at line 450 of file XML_Parser.cc.

Member Data Documentation

XML_Parser_Class* XML_Parser::pclass
protected

The class to which this parser belongs. Defines the behaviour of the parser.

Definition at line 256 of file XML_Parser.h.

Entity XML_Parser::initial_entity
protected

The entity we started from. May need to be freed at the end of the parse.

Definition at line 267 of file XML_Parser.h.


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