ost::XMLStream(3)
π ost::XMLStream(3) π
okay bestie, gather round, because this is the manual page for ost::XMLStream from GNU CommonC++, and it's genuinely giving parser royalty energy. π
β¨ NAME β¨
ost::XMLStream β this class implements a basic XML stream parser that you can use to examine an XML resource thru virtual I/O methods. π
πΈ SYNOPSIS πΈ
#include <xml.h>
Inherited by ost::XMLRPC.
π Public Member Functions π
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::Level getLogging (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.
π¦ Protected Member Functions π¦
virtual ~XMLStream ()
π Detailed Description π
This class implements a basic XML stream parser that can be used to examine an XML resource thru virtual I/O methods. no cap, that's the whole vibe. β¨
Here's the thing though, bestie: this class must be derived into one that can implement the physical I/O required to parse actual data. You can't just raw-dog it as-is, you gotta subclass it. A mixer class using XMLStream and URLStream would seem a likely combination for this purpose β like, that's the collab we'd want. π
π«Ά Author π«Ά
- David Sugar
dyfet@ostel.com
β XML Stream Parser (SAX) β
π Examples π
xmlfetch.cpp.
π Constructor & Destructor Documentation π
virtual ost::XMLStream::~XMLStream () [protected], [virtual]
yep. that's the destructor. protected. virtual. iconic behaviour honestly. π
π₯ Member Function Documentation π₯
virtual void ost::XMLStream::characters (const unsigned char * text, size_t len) [pure virtual]
Virtual to receive character text extracted from the document in the current element.
Parameters
textreceived.lenlength of text received.
virtual void ost::XMLStream::close (void) [virtual]
May perform a close operation of an i/o source when the parser has completed operation.
virtual void ost::XMLStream::comment (const unsigned char * text, size_t len) [virtual]
Virtual to receive embedded comments in an XML document being parsed.
Parameters
texttext comment extracted.lenlength of comment.
virtual void ost::XMLStream::endDocument (void) [virtual]
Identify end of document event.
virtual void ost::XMLStream::endElement (const unsigned char * name) [pure virtual]
Identify end of an element in the document.
Parameters
nameof element found.
virtual Slog::Level ost::XMLStream::getLogging (void) [virtual]
Get error logging level.
Returns
- error logging level.
virtual bool ost::XMLStream::open (const char * 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. (yes bestie, ignoring it is valid here, we love a flexible API π )
Returns
trueif open is successful.
Parameters
resourcepassed to Parse methods.
bool ost::XMLStream::parse (const char * resource = NULL)
Parse a resource as a stream thru the virtual read method.
Returns
trueif well formed document has been fully parsed.
Parameters
resourceoptional name of resource.
virtual int ost::XMLStream::read (unsigned char * buffer, size_t len) [pure virtual]
Read method to aquire data for the parser.
Returns
- number of bytes actually read.
Parameters
bufferto read data into.lennumber of bytes to read.
virtual void ost::XMLStream::startDocument (void) [virtual]
Identify start of document event.
virtual void ost::XMLStream::startElement (const unsigned char * name, const unsigned char ** attr) [pure virtual]
Identify start of an element in the document.
Parameters
nameof element found.attrlist of attributes extracted.
π Author π
Generated automatically by Doxygen for GNU CommonC++ from the source code.
okay so that's literally it bestie, go forth and parse π¦β¨
this page is from the GNU CommonC++ manual, dated Sun Dec 27 2020, and it's the ost::XMLStream(3) page β so if you're searching for it later, that's the whole address. π
π¦ where this page comes from
- ubuntu jammy: libcommoncpp2-doc 1.8.1-10
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms