#include <libxml/parser.h>
#include <libxml/tree.h>
Go to the source code of this file.
Namespaces | |
namespace | cajun |
Typedefs | |
typedef xmlDocPtr | cajun::xml_doc_t |
A pointer to an XML document. | |
typedef xmlNodePtr | cajun::xml_node_t |
A pointer to an XML node which may be contained within a document. | |
typedef xmlAttrPtr | cajun::xml_node_attr_t |
A pointer to an XML node attribute. | |
Functions | |
bool | cajun::xml_doc_is_valid (xml_doc_t doc) |
Test if an xml_doc_t is valid. | |
bool | cajun::xml_node_is_valid (xml_node_t node) |
Test if an xml_node_t is valid. | |
bool | cajun::xml_node_attr_is_valid (xml_node_attr_t node_attr) |
Test if an xml_node_attr_t is valid. | |
xml_doc_t | cajun::xml_new_doc () |
Create a new XML v1 document. | |
xml_doc_t | cajun::xml_parse_doc (const char *filename) |
Load and parse the XML document specified by filename. | |
bool | cajun::xml_save_doc (xml_doc_t doc, const char *filename) |
Save the XML document to the filename specified. | |
xml_node_t | cajun::xml_new_node (const char *name) |
Create an new node not associated with any document. | |
void | cajun::xml_remove_node (xml_node_t curr_node) |
Detach the current node from the document it is associated with. | |
void | cajun::xml_remove_and_free_node (xml_node_t curr_node) |
Detach the current node from the document it is associated with and free the associated memory. | |
void | cajun::xml_remove_node_by_name (xml_node_t start_node, const char *name) |
Perform a lookup from start_node of its children until name is reached, remove the first node found from the document it is associated with. | |
void | cajun::xml_remove_and_free_node_name (xml_node_t start_node, const char *name) |
Perform a lookup from start_node of its children until name is reached, remove the first node found from the document it is associated with and free the associated memory. | |
xml_node_t | cajun::xml_get_root_node (xml_doc_t doc) |
Get the root node of the specified document. | |
xml_node_t | cajun::xml_set_root_node (xml_doc_t doc, xml_node_t root) |
Set the root node of the specified document. | |
bool | cajun::xml_is_doc_type (xml_node_t root_node, const char *type) |
Determine if the root node of a document matches the given type. | |
xml_node_t | cajun::xml_get_node_by_name (xml_node_t start_node, const char *name) |
Search for a child node by name. | |
const char * | cajun::xml_node_get_contents_from_name (xml_node_t start_node, const char *name) |
Search for a child node by name and retrieve its contents. | |
void | cajun::xml_node_set_contents_from_name (xml_node_t start_node, const char *name, const char *val) |
Search for a child node by name and set its contents. | |
const char * | cajun::xml_node_get_contents (xml_node_t curr_node) |
Retrieve the contents of a node. | |
void | cajun::xml_node_set_contents (xml_node_t curr_node, const char *val) |
Set the contents of a node. | |
bool | cajun::xml_node_has_child (xml_node_t curr_node) |
Test if the given node has any children. | |
xml_node_t | cajun::xml_node_get_child (xml_node_t curr_node) |
Retrieve the first child of the specified node. | |
bool | cajun::xml_node_has_next (xml_node_t curr_node) |
Test if the given node has a next (sibling) node. | |
xml_node_t | cajun::xml_node_get_next (xml_node_t curr_node) |
Retrieve the next (sibling) node. | |
bool | cajun::xml_node_matches (xml_node_t curr_node, const char *name) |
Test if the current node matches the given name. | |
const char * | cajun::xml_node_name (xml_node_t curr_node) |
Retrieve the name of the current node. | |
xml_node_t | cajun::xml_node_add_child (xml_node_t curr_node, const char *name) |
Add a new child node to the current node without contents. | |
xml_node_t | cajun::xml_node_add_child (xml_node_t curr_node, const char *name, const char *content) |
Add a new child node to the current node with contents. | |
xml_node_attr_t | cajun::xml_node_add_prop (xml_node_t curr_node, const char *prop_name, const char *prop_val) |
Add a new property to the current node. | |
const char * | cajun::xml_node_get_prop (xml_node_t curr_node, const char *prop_name) |
Retrieve the named property from the current node. | |
const char * | cajun::xml_node_get_prop_from_name (xml_node_t start_node, const char *node_name, const char *prop_name) |
Retrieve the named property from a named child of start_node. | |
xml_node_attr_t | cajun::xml_node_set_prop (xml_node_t curr_node, const char *prop_name, const char *prop_val) |
Set the named property at the current node. | |
bool | cajun::xml_node_has_prop (xml_node_t curr_node, const char *prop_name) |
Test if the given node has the named property. |