Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

XMLStream Class Reference

This class impliments a basic XML stream parser that can be used to examine an XML resource thru virtual I/O methods. XML Stream Parser (SAX). More...

#include <xml.h>

List of all members.

Public Methods

virtual bool Open (const char *resource)
 May perform an open operation on behalf of a parsed resource. More...

virtual void Close (void)
 May perform a close operation of an i/o source when the parser has completed operation. More...

virtual slog_level_t getLogging (void)
 Get error logging level. More...

virtual void comment (const unsigned char *text)
 Virtual to receive embedded comments in an XML document being parsed. More...

virtual int Read (unsigned char *buffer, int len)=0
 Read method to aquire data for the parser. More...

virtual void characters (const unsigned char *text, unsigned len)=0
 Virtual to receive character text extracted from the document in the current element. More...

virtual void startDocument (void)
 Identify start of document event. More...

virtual void endDocument (void)
 Identify end of document event. More...

virtual void startElement (const unsigned char *name, const unsigned char **attr)=0
 Identify start of an element in the document. More...

virtual void endElement (const unsigned char *name)=0
 Identify end of an element in the document. More...

bool Parse (const char *resource=NULL)
 Parse a resource as a stream thru the virtual read method. More...


Detailed Description

This class impliments a basic XML stream parser that can be used to examine an XML resource thru virtual I/O methods. XML Stream Parser (SAX).

This class must be derived into one that can impliment the physical I/O required to parse actual data. A mixer class using XMLStream and URLStream would seem a likely combination for this purpose.

Author:
David Sugar <dyfet@ostel.com>


Member Function Documentation

virtual void XMLStream::Close void   [inline, virtual]
 

May perform a close operation of an i/o source when the parser has completed operation.

virtual bool XMLStream::Open const char *   resource [inline, virtual]
 

May perform an open operation on behalf of a parsed resource.

In some cases, the parser may be merged with a class that already has performed some kind of open, and this method can then be ignored.

Returns:
true if open is successful.
Parameters:
resource   passed to Parse methods.

bool XMLStream::Parse const char *   resource = NULL
 

Parse a resource as a stream thru the virtual read method.

Returns:
true if well formed document has been fully parsed.
Parameters:
optional   name of resource.

virtual int XMLStream::Read unsigned char *   buffer,
int   len
[pure virtual]
 

Read method to aquire data for the parser.

Returns:
number of bytes actually read.
Parameters:
buffer   to read data into.
number   of bytes to read.

virtual void XMLStream::characters const unsigned char *   text,
unsigned   len
[pure virtual]
 

Virtual to receive character text extracted from the document in the current element.

Parameters:
text   received.
length   of text received.

virtual void XMLStream::comment const unsigned char *   text [inline, virtual]
 

Virtual to receive embedded comments in an XML document being parsed.

Parameters:
text   comment extracted.

virtual void XMLStream::endDocument void   [inline, virtual]
 

Identify end of document event.

virtual void XMLStream::endElement const unsigned char *   name [pure virtual]
 

Identify end of an element in the document.

Parameters:
name   of element found.

virtual slog_level_t XMLStream::getLogging void   [inline, virtual]
 

Get error logging level.

Returns:
error logging level.

virtual void XMLStream::startDocument void   [inline, virtual]
 

Identify start of document event.

virtual void XMLStream::startElement const unsigned char *   name,
const unsigned char **   attr
[pure virtual]
 

Identify start of an element in the document.

Parameters:
name   of element found.
list   of attributes extracted.


The documentation for this class was generated from the following file:
Generated at Tue Nov 20 12:34:38 2001 for CommonC++ by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001