ost::XMLStream - This class impliments a basic XML stream parser that can be used to examine an XML
Contents
Constructor & Destructor Documentation
virtualost::XMLStream::~XMLStream()[protected],[virtual]
Detailed Description
This class impliments a basic XML stream parser that can be used to examine an XML resource thru virtual
I/O methods.
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
XML Stream Parser (SAX)
Examplesxmlfetch.cpp.
Member Function Documentation
virtualvoidost::XMLStream::characters(constunsignedchar*text,size_tlen)[purevirtual]
Virtual to receive character text extracted from the document in the current element.
Parameterstext received.
len length of text received.
virtualvoidost::XMLStream::close(void)[virtual]
May perform a close operation of an i/o source when the parser has completed operation.
virtualvoidost::XMLStream::comment(constunsignedchar*text,size_tlen)[virtual]
Virtual to receive embedded comments in an XML document being parsed.
Parameterstext text comment extracted.
len length of comment.
virtualvoidost::XMLStream::endDocument(void)[virtual]
Identify end of document event.
virtualvoidost::XMLStream::endElement(constunsignedchar*name)[purevirtual]
Identify end of an element in the document.
Parametersname of element found.
virtualSlog::Levelost::XMLStream::getLogging(void)[virtual]
Get error logging level.
Returns
error logging level.
virtualboolost::XMLStream::open(constchar*resource)[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.
Parametersresource passed to Parse methods.
boolost::XMLStream::parse(constchar*resource=NULL)
Parse a resource as a stream thru the virtual read method.
Returns
true if well formed document has been fully parsed.
Parametersresource optional name of resource.
virtualintost::XMLStream::read(unsignedchar*buffer,size_tlen)[purevirtual]
Read method to aquire data for the parser.
Returns
number of bytes actually read.
Parametersbuffer to read data into.
len number of bytes to read.
virtualvoidost::XMLStream::startDocument(void)[virtual]
Identify start of document event.
virtualvoidost::XMLStream::startElement(constunsignedchar*name,constunsignedchar**attr)[purevirtual]
Identify start of an element in the document.
Parametersname of element found.
attr list of attributes extracted.
Name
ost::XMLStream - This class impliments a basic XML stream parser that can be used to examine an XML
resource thru virtual I/O methods.
Synopsis
#include <xml.h>
Inherited by ost::XMLRPC.
PublicMemberFunctions
virtual bool open (const char *resource)
May perform an open operation on behalf of a parsed resource.
virtual void close (void)
May perform a close operation of an i/o source when the parser has completed operation.
virtual Slog::LevelgetLogging (void)
Get error logging level.
virtual void comment (const unsigned char *text, size_t len)
Virtual to receive embedded comments in an XML document being parsed.
virtual int read (unsigned char *buffer, size_t len)=0
Read method to aquire data for the parser.
virtual void characters (const unsigned char *text, size_t len)=0
Virtual to receive character text extracted from the document in the current element.
virtual void startDocument (void)
Identify start of document event.
virtual void endDocument (void)
Identify end of document event.
virtual void startElement (const unsigned char *name, const unsigned char **attr)=0
Identify start of an element in the document.
virtual void endElement (const unsigned char *name)=0
Identify end of an element in the document.
bool parse (const char *resource=NULL)
Parse a resource as a stream thru the virtual read method.
ProtectedMemberFunctions
virtual ~XMLStream ()
