25 #ifndef COMMONCPP_XML_H_
26 #define COMMONCPP_XML_H_
28 #ifndef COMMONCPP_CONFIG_H_
29 #include <commoncpp/config.h>
49 enum {TAG, CDATA, COMMENT, DTD, AMP, NONE, END} state;
51 unsigned bufpos, bufsize;
52 __LOCAL
bool parseTag(
void);
53 __LOCAL
void putBuffer(
char c);
54 __LOCAL
void clearBuffer(
void);
75 virtual void comment(
const caddr_t text,
size_t size);
82 virtual void characters(
const caddr_t text,
size_t size);
116 bool partial(
const char *address,
size_t size);
virtual void comment(const caddr_t text, size_t size)
Virtual to receive embedded comments in XML document being parsed.
virtual void startDocument(void)
Notify start of document event.
bool end(void) const
End of document check.
virtual void endElement(const caddr_t name)=0
Notify end of an element in the document.
virtual void characters(const caddr_t text, size_t size)
Virtual to receive character text extracted from the document.
bool parse(FILE *file)
Parse a file buffer and return parser document completion flag.
bool partial(const char *address, size_t size)
Parse a chunk of data and return parser completion flag.
bool parse(const char *cp)
Parse a stream buffer and return parser document completion flag.
virtual void startElement(const caddr_t name, caddr_t *attr)=0
Notify start of an element in the document.
XMLParser(unsigned size=8192)
Create xml parser.
virtual ~XMLParser()
Destroy xml parser.
virtual void endDocument(void)
Notify end of document event.