#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
Go to the source code of this file.
Data Structures | |
struct | stp_mxml_attr_s |
struct | stp_mxml_value_s |
struct | stp_mxml_text_s |
union | stp_mxml_value_u |
struct | stp_mxml_node_s |
Defines | |
#define | STP_MXML_WRAP 70 /* Wrap XML output at this column position */ |
#define | STP_MXML_TAB 8 /* Tabs every N columns */ |
#define | STP_MXML_NO_CALLBACK 0 /* Don't use a type callback */ |
#define | STP_MXML_NO_PARENT 0 /* No parent for the node */ |
#define | STP_MXML_DESCEND 1 /* Descend when finding/walking */ |
#define | STP_MXML_NO_DESCEND 0 /* Don't descend when finding/walking */ |
#define | STP_MXML_DESCEND_FIRST -1 /* Descend for first find */ |
#define | STP_MXML_WS_BEFORE_OPEN 0 /* Callback for before open tag */ |
#define | STP_MXML_WS_AFTER_OPEN 1 /* Callback for after open tag */ |
#define | STP_MXML_WS_BEFORE_CLOSE 2 /* Callback for before close tag */ |
#define | STP_MXML_WS_AFTER_CLOSE 3 /* Callback for after close tag */ |
#define | STP_MXML_ADD_BEFORE 0 /* Add node before specified node */ |
#define | STP_MXML_ADD_AFTER 1 /* Add node after specified node */ |
#define | STP_MXML_ADD_TO_PARENT NULL /* Add node relative to parent */ |
Typedefs | |
typedef enum stp_mxml_type_e | stp_mxml_type_t |
typedef stp_mxml_attr_s | stp_mxml_attr_t |
typedef stp_mxml_value_s | stp_mxml_element_t |
typedef stp_mxml_text_s | stp_mxml_text_t |
typedef stp_mxml_value_u | stp_mxml_value_t |
typedef stp_mxml_node_s | stp_mxml_node_t |
Enumerations | |
enum | stp_mxml_type_e { STP_MXML_ELEMENT, STP_MXML_INTEGER, STP_MXML_OPAQUE, STP_MXML_REAL, STP_MXML_TEXT } |
Functions | |
void | stp_mxmlAdd (stp_mxml_node_t *parent, int where, stp_mxml_node_t *child, stp_mxml_node_t *node) |
void | stp_mxmlDelete (stp_mxml_node_t *node) |
const char * | stp_mxmlElementGetAttr (stp_mxml_node_t *node, const char *name) |
void | stp_mxmlElementSetAttr (stp_mxml_node_t *node, const char *name, const char *value) |
stp_mxml_node_t * | stp_mxmlFindElement (stp_mxml_node_t *node, stp_mxml_node_t *top, const char *name, const char *attr, const char *value, int descend) |
stp_mxml_node_t * | stp_mxmlLoadFile (stp_mxml_node_t *top, FILE *fp, stp_mxml_type_t(*cb)(stp_mxml_node_t *)) |
stp_mxml_node_t * | stp_mxmlLoadString (stp_mxml_node_t *top, const char *s, stp_mxml_type_t(*cb)(stp_mxml_node_t *)) |
stp_mxml_node_t * | stp_mxmlNewElement (stp_mxml_node_t *parent, const char *name) |
stp_mxml_node_t * | stp_mxmlNewInteger (stp_mxml_node_t *parent, int integer) |
stp_mxml_node_t * | stp_mxmlNewOpaque (stp_mxml_node_t *parent, const char *opaque) |
stp_mxml_node_t * | stp_mxmlNewReal (stp_mxml_node_t *parent, double real) |
stp_mxml_node_t * | stp_mxmlNewText (stp_mxml_node_t *parent, int whitespace, const char *string) |
void | stp_mxmlRemove (stp_mxml_node_t *node) |
char * | stp_mxmlSaveAllocString (stp_mxml_node_t *node, int(*cb)(stp_mxml_node_t *, int)) |
int | stp_mxmlSaveFile (stp_mxml_node_t *node, FILE *fp, int(*cb)(stp_mxml_node_t *, int)) |
int | stp_mxmlSaveString (stp_mxml_node_t *node, char *buffer, int bufsize, int(*cb)(stp_mxml_node_t *, int)) |
stp_mxml_node_t * | stp_mxmlWalkNext (stp_mxml_node_t *node, stp_mxml_node_t *top, int descend) |
stp_mxml_node_t * | stp_mxmlWalkPrev (stp_mxml_node_t *node, stp_mxml_node_t *top, int descend) |
|
Definition at line 69 of file mxml.h. Referenced by mxml_new(), stp_mxmlAdd(), stp_xmltree_create_from_array(), stp_xmltree_create_from_curve(), and xmldoc_create_from_curve(). |
|
Definition at line 67 of file mxml.h. Referenced by stp_mxmlAdd(). |
|
Definition at line 71 of file mxml.h. Referenced by mxml_new(). |
|
Definition at line 51 of file mxml.h. Referenced by stp_array_create_from_xmltree(), stp_curve_create_from_xmltree(), stp_mxmlFindElement(), stp_xml_get_node(), and stpi_dither_array_create_from_xmltree(). |
|
|
|
Definition at line 46 of file mxml.h. Referenced by stp_curve_create_from_file(), stp_curve_create_from_stream(), stp_curve_create_from_string(), stp_xml_parse_file(), and stpi_dither_array_create_from_file(). |
|
|
|
|
|
Definition at line 43 of file mxml.h. Referenced by mxml_write_ws(). |
|
Definition at line 41 of file mxml.h. Referenced by mxml_write_node(). |
|
Definition at line 64 of file mxml.h. Referenced by curve_whitespace_callback(), and mxml_write_node(). |
|
Definition at line 60 of file mxml.h. Referenced by curve_whitespace_callback(), and mxml_write_node(). |
|
Definition at line 62 of file mxml.h. Referenced by curve_whitespace_callback(), and mxml_write_node(). |
|
Definition at line 58 of file mxml.h. Referenced by curve_whitespace_callback(), and mxml_write_node(). |
|
Referenced by mxml_write_node(), stp_mxmlElementGetAttr(), and stp_mxmlElementSetAttr(). |
|
|
|
|
|
|
Referenced by mxml_load_data(), mxml_new(), stp_mxmlLoadFile(), and stp_mxmlLoadString(). |
|
|
|
|
|
Definition at line 58 of file mxml-node.c. References stp_mxml_node_s::child, stp_mxml_node_s::last_child, stp_mxml_node_s::next, stp_mxml_node_s::parent, stp_mxml_node_s::prev, STP_MXML_ADD_AFTER, STP_MXML_ADD_BEFORE, stp_mxml_node_t, and stp_mxmlRemove(). Referenced by mxml_new(), stp_xmltree_create_from_array(), stp_xmltree_create_from_curve(), and xmldoc_create_from_curve(). |
|
|
|
|
Definition at line 48 of file mxml-search.c. References stp_mxml_value_u::element, stp_mxml_value_s::name, stp_mxml_node_s::next, STP_MXML_DESCEND, STP_MXML_ELEMENT, stp_mxml_node_t, stp_mxmlElementGetAttr(), stp_mxmlWalkNext(), stp_mxml_node_s::type, and stp_mxml_node_s::value. Referenced by stp_array_create_from_xmltree(), stp_curve_create_from_xmltree(), stp_xml_get_node(), and stpi_dither_array_create_from_xmltree(). |
|
Definition at line 81 of file mxml-file.c. References mxml_file_getc(), mxml_load_data(), and stp_mxml_type_t. Referenced by stp_curve_create_from_file(), stp_curve_create_from_stream(), stp_xml_parse_file(), and stpi_dither_array_create_from_file(). |
|
Definition at line 102 of file mxml-file.c. References mxml_load_data(), mxml_string_getc(), and stp_mxml_type_t. Referenced by stp_curve_create_from_string(). |
|
Definition at line 251 of file mxml-node.c. References stp_mxml_value_u::element, mxml_new(), stp_mxml_value_s::name, STP_MXML_ELEMENT, stp_mxml_node_t, and stp_mxml_node_s::value. Referenced by mxml_load_data(), stp_xmldoc_create_generic(), stp_xmltree_create_from_array(), stp_xmltree_create_from_curve(), and stp_xmltree_create_from_sequence(). |
|
Definition at line 284 of file mxml-node.c. References stp_mxml_value_u::integer, mxml_new(), STP_MXML_INTEGER, stp_mxml_node_t, and stp_mxml_node_s::value. Referenced by mxml_load_data(). |
|
Definition at line 318 of file mxml-node.c. References mxml_new(), stp_mxml_value_u::opaque, stp_mxml_node_t, STP_MXML_OPAQUE, and stp_mxml_node_s::value. Referenced by mxml_load_data(). |
|
Definition at line 351 of file mxml-node.c. References mxml_new(), stp_mxml_value_u::real, stp_mxml_node_t, STP_MXML_REAL, and stp_mxml_node_s::value. Referenced by mxml_load_data(). |
|
Definition at line 386 of file mxml-node.c. References mxml_new(), stp_mxml_node_t, STP_MXML_TEXT, stp_mxml_text_s::string, stp_mxml_value_u::text, stp_mxml_node_s::value, and stp_mxml_text_s::whitespace. Referenced by mxml_load_data(), and stp_xmltree_create_from_sequence(). |
|
Definition at line 422 of file mxml-node.c. References stp_mxml_node_s::child, stp_mxml_node_s::last_child, stp_mxml_node_s::next, stp_mxml_node_s::parent, stp_mxml_node_s::prev, and stp_mxml_node_t. Referenced by stp_mxmlAdd(), and stp_mxmlDelete(). |
|
Definition at line 122 of file mxml-file.c. References stp_mxmlSaveString(). Referenced by stp_curve_write_string(). |
|
Definition at line 179 of file mxml-file.c. References mxml_file_putc(), and mxml_write_node(). Referenced by stp_curve_write(). |
|
Definition at line 215 of file mxml-file.c. References mxml_string_putc(), and mxml_write_node(). Referenced by stp_mxmlSaveAllocString(). |
|
Definition at line 130 of file mxml-search.c. References stp_mxml_node_s::child, stp_mxml_node_s::next, stp_mxml_node_s::parent, and stp_mxml_node_t. Referenced by stp_mxmlFindElement(). |
|
Definition at line 166 of file mxml-search.c. References stp_mxml_node_s::last_child, stp_mxml_node_s::parent, stp_mxml_node_s::prev, and stp_mxml_node_t. |