libdom
|
#include <stdbool.h>
#include <string.h>
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <dom/dom.h>
#include "xmlparser.h"
#include "utils.h"
#include <expat.h>
Classes | |
struct | dom_xml_parser |
Functions | |
dom_xml_parser * | dom_xml_parser_create (const char *enc, const char *int_enc, dom_msg msg, void *mctx, dom_document **document) |
void | dom_xml_parser_destroy (dom_xml_parser *parser) |
dom_xml_error | dom_xml_parser_parse_chunk (dom_xml_parser *parser, uint8_t *data, size_t len) |
dom_xml_error | dom_xml_parser_completed (dom_xml_parser *parser) |
dom_xml_error dom_xml_parser_completed | ( | dom_xml_parser * | parser | ) |
Notify parser that datastream is empty
parser | The XML parser instance to notify |
This will force any remaining data through the parser
dom_xml_parser * dom_xml_parser_create | ( | const char * | enc, |
const char * | int_enc, | ||
dom_msg | msg, | ||
void * | mctx, | ||
dom_document ** | document ) |
Create an XML parser instance
enc | Source charset, or NULL |
int_enc | Desired charset of document buffer (UTF-8 or UTF-16) |
msg | Informational message function |
mctx | Pointer to client-specific private data |
document | DOM Document |
int_enc is ignored due to it being made of bees.
void dom_xml_parser_destroy | ( | dom_xml_parser * | parser | ) |
Destroy an XML parser instance
parser | The parser instance to destroy |
dom_xml_error dom_xml_parser_parse_chunk | ( | dom_xml_parser * | parser, |
uint8_t * | data, | ||
size_t | len ) |
Parse a chunk of data
parser | The XML parser instance to use for parsing |
data | Pointer to data chunk |
len | Byte length of data chunk |