DTS Application Library
0.2.3
Application library containing referenced objects and interfaces to common libraries
|
XML Interface. More...
#include <string.h>
#include <stdint.h>
#include <libxml/tree.h>
#include <libxml/parser.h>
#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>
#include "include/priv_xml.h"
#include "include/dtsapp.h"
Go to the source code of this file.
Data Structures | |
struct | xml_node_iter |
Iterator to traverse nodes in a xpath. More... | |
struct | xml_search |
XML xpath search result. More... | |
Functions | |
void | xml_free_buffer (void *data) |
Reference destructor for xml_buffer. More... | |
struct xml_doc * | xml_loaddoc (const char *docfile, int validate) |
Load a XML file into XML document and return reference. More... | |
struct xml_doc * | xml_loadbuf (const uint8_t *buffer, uint32_t len, int validate) |
Load a buffer into XML document returning refereence. More... | |
struct xml_node * | xml_getrootnode (struct xml_doc *xmldoc) |
Return reference to the root node. More... | |
struct xml_node * | xml_getfirstnode (struct xml_search *xpsearch, void **iter) |
Return reference to the first node optionally creating a iterator. More... | |
struct xml_node * | xml_getnextnode (void *iter) |
Return the next node. More... | |
struct bucket_list * | xml_getnodes (struct xml_search *xpsearch) |
Return reference to bucket list containing nodes. More... | |
struct xml_search * | xml_xpath (struct xml_doc *xmldata, const char *xpath, const char *attrkey) |
Return a reference to a xpath search result. More... | |
int | xml_nodecount (struct xml_search *xsearch) |
Return the number of nodes in the search path. More... | |
struct xml_node * | xml_getnode (struct xml_search *xsearch, const char *key) |
Return a node in the search matching key. More... | |
const char * | xml_getattr (struct xml_node *xnode, const char *attr) |
Return value of attribute. More... | |
const char * | xml_getrootname (struct xml_doc *xmldoc) |
Return the name of the root node. More... | |
void | xml_modify (struct xml_doc *xmldoc, struct xml_node *xnode, const char *value) |
Modify a XML node. More... | |
void | xml_setattr (struct xml_doc *xmldoc, struct xml_node *xnode, const char *name, const char *value) |
Modify a XML node attribute. More... | |
void | xml_createpath (struct xml_doc *xmldoc, const char *xpath) |
Create a path in XML document. More... | |
void | xml_appendnode (struct xml_doc *xmldoc, const char *xpath, struct xml_node *child) |
Append a node to a path. More... | |
struct xml_node * | xml_addnode (struct xml_doc *xmldoc, const char *xpath, const char *name, const char *value, const char *attrkey, const char *keyval) |
Append a node to a path. More... | |
void | xml_unlink (struct xml_node *xnode) |
Unlink a node from the document. More... | |
void | xml_delete (struct xml_node *xnode) |
Delete a node from document it is not unrefd and should be. More... | |
char * | xml_getbuffer (void *buffer) |
Return the buffer of a xml_buffer structure. More... | |
void * | xml_doctobuffer (struct xml_doc *xmldoc) |
Return a dump of a XML document. More... | |
void | xml_init () |
Initialise/Reference the XML library. More... | |
void | xml_close () |
Unreference the XML library. More... | |
void | xml_savefile (struct xml_doc *xmldoc, const char *file, int format, int compress) |
Save XML document to a file. More... | |
XML Interface.
Definition in file libxml2.c.