Loading...
Searching...
No Matches
XML_Parser Class Reference

`#include <include/rxp/XML_Parser.h>`

Collaboration diagram for XML_Parser:
[legend]

## 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_Class * | pclass
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_String > | p_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.

## Constructor & Destructor Documentation

## XML_Parser()

XML_Parser::XML_Parser | ( | XML_Parser_Class & | parent,
|  | InputSource | source,
|  | Entity | initial_entity,
|  | void * | data )

protected

Creator used by XML_Parser_Class::make_parser().

Definition at line 246 of file XML_Parser.cc.

## ~XML_Parser()

XML_Parser::~XML_Parser | ( |  | ) |

Destructor, may close input if required.

Definition at line 261 of file XML_Parser.cc.

## Member Function Documentation

## open()

InputSource XML_Parser::open | ( | Entity | ent | ) |

protected

Open. Asks the parser class to do the work.

Definition at line 269 of file XML_Parser.cc.

## get_error()

const char * XML_Parser::get_error | ( |  | ) |

protected

Get the error message for the last error.

Definition at line 395 of file XML_Parser.cc.

## track_context()

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.

## track_contents()

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.

## context()

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.

## go()

void XML_Parser::go | ( |  | ) |

Run the parser.

Definition at line 274 of file XML_Parser.cc.

## Friends And Related Symbol Documentation

## XML_Parser_Class

friend class XML_Parser_Class

friend

Definition at line 316 of file XML_Parser.h.

## Member Data Documentation

## pclass

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.

## current_bit

XBit XML_Parser::current_bit

protected

The piece of markup being processed.

Definition at line 259 of file XML_Parser.h.

## source

InputSource XML_Parser::source

protected

Where we are reading from.

Definition at line 262 of file XML_Parser.h.

## initial_entity

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.

## data

void* XML_Parser::data

protected

Arbitrary data which can be used by callbacks.

Definition at line 270 of file XML_Parser.h.

## p

Parser XML_Parser::p

protected

The RXP parser object.

Definition at line 273 of file XML_Parser.h.

## p_context

EST_TDeque<EST_String> XML_Parser::p_context

protected

If context is being tracked, this is a stack of element names.

Definition at line 276 of file XML_Parser.h.

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

- include/rxp/XML_Parser.h
- rxp/XML_Parser.cc