LibreOffice Module shell (master) 1
|
#include <xml_parser.hxx>
Public Member Functions | |
xml_parser () | |
~xml_parser () | |
void | parse (const char *XmlData, size_t Length, bool IsFinal) |
Parse a XML data stream. More... | |
void | set_document_handler (i_xml_parser_event_handler *event_handler) |
Set a document handler. More... | |
i_xml_parser_event_handler * | get_document_handler () const |
Returns the currently used document handler or null if no document handler was set before. More... | |
Private Member Functions | |
void | init () |
xml_parser (const xml_parser &)=delete | |
xml_parser & | operator= (const xml_parser &)=delete |
Private Attributes | |
i_xml_parser_event_handler * | document_handler_ |
XML_Parser | xml_parser_ |
Definition at line 40 of file xml_parser.hxx.
xml_parser::xml_parser | ( | ) |
Definition at line 72 of file xml_parser.cxx.
References init().
xml_parser::~xml_parser | ( | ) |
Definition at line 79 of file xml_parser.cxx.
References xml_parser_.
|
privatedelete |
|
inline |
Returns the currently used document handler or null if no document handler was set before.
Definition at line 88 of file xml_parser.hxx.
References document_handler_.
Referenced by xml_character_data_handler(), xml_comment_handler(), xml_end_element_handler(), and xml_start_element_handler().
|
private |
Definition at line 151 of file xml_parser.cxx.
References xml_character_data_handler(), xml_comment_handler(), xml_end_element_handler(), xml_parser_, and xml_start_element_handler().
Referenced by xml_parser().
|
privatedelete |
void xml_parser::parse | ( | const char * | XmlData, |
size_t | Length, | ||
bool | IsFinal | ||
) |
Parse a XML data stream.
pXmlData | Pointer to a buffer containing the xml data |
Length | Length of the buffer containing the xml data |
IsFinal | Indicates whether these are the last xml data of an xml document to parse. For very large xml documents it may be useful to read and parse the document partially. |
@precond XmlData must not be null
SaxException | If the used Sax parser returns an error. The SaxException contains detailed information about the error. |
Definition at line 175 of file xml_parser.cxx.
References xml_parser_.
void xml_parser::set_document_handler | ( | i_xml_parser_event_handler * | event_handler | ) |
Set a document handler.
@descr A document handler implements the interface i_xml_parser_event_handler. The document handler receive notifications of various events from the sax parser for instance "start_document".
The client is responsible for the life time management of the given document handler, that means the document handler instance must exist until a new one was set or until the parser no longer exist.
SaxDocumentHandler | The new document handler, may be null if not interested in sax parser events. |
@postcond currently used document handler == pSaxDocumentHandler
Definition at line 185 of file xml_parser.cxx.
References document_handler_.
|
private |
Definition at line 94 of file xml_parser.hxx.
Referenced by get_document_handler(), and set_document_handler().
|
private |
Definition at line 95 of file xml_parser.hxx.
Referenced by init(), parse(), and ~xml_parser().