#include "slist.h"
#include "dictionary.h"
Include dependency graph for xmlt.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Data Structures | |
struct | _xml_node |
struct | xml_attribute |
Every tag has a list of attributes, which are key-value pairs as defined in this struct. More... | |
Defines | |
#define | XML_UNKNOWN_TAG -1 |
Tags that were not recognized get this value. | |
#define | XML_UNKNOWN_ATTRIBUTE -1 |
Attributes that were not recognized get this value. | |
Enumerations | |
enum | xml_node_t |
Type of XML node, used in the xml_node struct. | |
Functions | |
void * | xmlt_create_context (void(*callback)(void *, xml_node *), void *cb_data, dictionary *tags, dictionary *attribs) |
Create a context for parsing an XML stream. | |
int | xmlt_parse (void *context, const char *data, size_t len) |
Parse a chunk of XML data. | |
void | xmlt_free_context (void *context) |
Free all memory associated with a particular context. | |
void | xmlt_free_document (xml_node *doc) |
Free all memory associated with a particular document. | |
void | xmlt_rescan_document (xml_node *doc, dictionary *tags, dictionary *attribs) |
Try to identify the unknown tags and attributes using a different set of dictionaries. | |
xml_node * | xmlt_get_next (xml_node *iter, xml_node *doc) |
Get the next node in the document, depth first. | |
xml_node * | xmlt_get_next_shallow (xml_node *iter) |
Get the next node in the document, without descending. |
Definition in file xmlt.h.
|
Attributes that were not recognized get this value. This value could be replaced later on by xmlt_rescan_document. |
|
Tags that were not recognized get this value. This value could be replaced later on by xmlt_rescan_document. |
|
Create a context for parsing an XML stream. Whenever a complete document was received, callback is invoked with the provided cb_data, and the root tag of the document. The dictionaries for tags and attributes are used for looking up tag names and attribute keys. (These are stored as an integer, not as the complete string, for speed and memory efficiency.)
|
|
Free all memory associated with a particular context.
|
|
Free all memory associated with a particular document.
|
|
Get the next node in the document, depth first.
|
|
Get the next node in the document, without descending.
|
|
Parse a chunk of XML data.
|
|
Try to identify the unknown tags and attributes using a different set of dictionaries.
|