#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
Go to the source code of this file.
#define MXML_ADD_AFTER 1 |
Definition at line 68 of file mxml.h.
Referenced by add_variable(), agent_xml_compose(), agent_xml_compose__agent_data(), agent_xml_compose__create_row_nodes(), agent_xml_compose__data(), agent_xml_compose__gaf_message(), agent_xml_compose__message(), agent_xml_compose__mobile_agent(), agent_xml_compose__task(), agent_xml_compose__tasks(), fipa_envelope_Compose(), fipa_envelope_Compose__envelope(), fipa_envelope_Compose__params(), mxml_new(), mxmlAdd(), scan_file(), and sort_node().
#define MXML_ADD_BEFORE 0 |
Definition at line 67 of file mxml.h.
Referenced by mxmlAdd(), scan_file(), and sort_node().
#define MXML_ADD_TO_PARENT NULL |
Definition at line 69 of file mxml.h.
Referenced by add_variable(), agent_xml_compose(), agent_xml_compose__create_row_nodes(), fipa_envelope_Compose(), fipa_envelope_Compose__envelope(), fipa_envelope_Compose__params(), mxml_new(), scan_file(), and sort_node().
#define MXML_DESCEND 1 |
Definition at line 58 of file mxml.h.
Referenced by agent_xml_parse__tasks(), main(), MC_LoadAgentFromFile(), message_xml_parse(), mxmlFindElement(), mxmlIndexNew(), and write_element().
#define MXML_DESCEND_FIRST -1 |
Definition at line 60 of file mxml.h.
Referenced by agent_xml_parse__fill_row_data(), agent_xml_parse__task(), agent_xml_parse__tasks(), fipa_envelope_HandleAclRepresentation(), fipa_envelope_HandleComments(), fipa_envelope_HandleDate(), fipa_envelope_HandleEnvelope(), fipa_envelope_HandleFrom(), fipa_envelope_HandleIntendedReceiver(), fipa_envelope_HandleParams(), fipa_envelope_HandlePayloadEncoding(), fipa_envelope_HandlePayloadLength(), fipa_envelope_HandleReceived(), fipa_envelope_HandleTo(), fipa_envelope_ParseAddresses(), fipa_envelope_ParseAgentIdentifier(), fipa_envelope_ParseResolvers(), scan_file(), sort_node(), and write_documentation().
#define MXML_INTEGER_CALLBACK mxml_integer_cb |
#define MXML_NO_CALLBACK 0 |
Definition at line 47 of file mxml.h.
Referenced by acc_connection_Thread(), agent_xml_compose(), fipa_envelope_Compose(), fipa_envelope_Parse(), main(), message_InitializeFromAgent(), message_InitializeFromConnection(), and message_InitializeFromString().
#define MXML_NO_DESCEND 0 |
Definition at line 59 of file mxml.h.
Referenced by agent_xml_parse__task(), agent_xml_parse__tasks(), fipa_envelope_HandleIntendedReceiver(), fipa_envelope_HandleTo(), fipa_envelope_ParseAddresses(), fipa_envelope_ParseResolvers(), main(), message_xml_parse(), write_documentation(), write_element(), xml_find_sibling(), and xml_get_deep_child().
#define MXML_NO_PARENT 0 |
Definition at line 56 of file mxml.h.
Referenced by agent_xml_compose__agent_code(), agent_xml_compose__create_row_nodes(), main(), and scan_file().
#define MXML_OPAQUE_CALLBACK mxml_opaque_cb |
#define MXML_TAB 8 |
Definition at line 45 of file mxml.h.
Referenced by mxml_write_ws().
#define MXML_WRAP 72 |
Definition at line 44 of file mxml.h.
Referenced by mxml_write_node().
#define MXML_WS_AFTER_CLOSE 3 |
Definition at line 65 of file mxml.h.
Referenced by mxml_write_node(), whitespace_cb(), and ws_cb().
#define MXML_WS_AFTER_OPEN 1 |
Definition at line 63 of file mxml.h.
Referenced by mxml_write_node(), whitespace_cb(), and ws_cb().
#define MXML_WS_BEFORE_CLOSE 2 |
Definition at line 64 of file mxml.h.
Referenced by mxml_write_node(), whitespace_cb(), and ws_cb().
#define MXML_WS_BEFORE_OPEN 0 |
Definition at line 62 of file mxml.h.
Referenced by mxml_write_node(), whitespace_cb(), and ws_cb().
typedef struct mxml_attr_s mxml_attr_t |
typedef int(* mxml_custom_load_cb_t)(mxml_node_t *, const char *) |
typedef char*(* mxml_custom_save_cb_t)(mxml_node_t *) |
typedef struct mxml_custom_s mxml_custom_t |
typedef struct mxml_value_s mxml_element_t |
typedef struct mxml_index_s mxml_index_t |
typedef struct mxml_node_s mxml_node_t |
typedef struct mxml_text_s mxml_text_t |
typedef enum mxml_type_e mxml_type_t |
typedef union mxml_value_u mxml_value_t |
enum mxml_type_e |
void mxml_error | ( | const char * | format, | |
... | ||||
) |
Definition at line 53 of file mxml-private.c.
References mxml_error_cb, and mxml_strdupf().
Referenced by mxml_add_char(), mxml_fd_getc(), mxml_file_getc(), mxml_get_entity(), mxml_load_data(), mxml_parse_element(), mxml_string_getc(), mxmlElementSetAttr(), mxmlEntityAddCallback(), and mxmlIndexNew().
mxml_type_t mxml_integer_cb | ( | mxml_node_t * | node | ) |
Definition at line 99 of file mxml-private.c.
References MXML_INTEGER.
mxml_type_t mxml_opaque_cb | ( | mxml_node_t * | node | ) |
Definition at line 112 of file mxml-private.c.
References MXML_OPAQUE.
mxml_type_t mxml_real_cb | ( | mxml_node_t * | node | ) |
Definition at line 125 of file mxml-private.c.
References MXML_REAL.
void mxmlAdd | ( | mxml_node_t * | parent, | |
int | where, | |||
mxml_node_t * | child, | |||
mxml_node_t * | node | |||
) |
Definition at line 66 of file mxml-node.c.
References mxml_node_s::child, mxml_node_s::last_child, MXML_ADD_AFTER, MXML_ADD_BEFORE, mxmlRemove(), mxml_node_s::next, mxml_node_s::parent, and mxml_node_s::prev.
Referenced by add_variable(), agent_xml_compose(), agent_xml_compose__agent_data(), agent_xml_compose__create_row_nodes(), agent_xml_compose__data(), agent_xml_compose__gaf_message(), agent_xml_compose__message(), agent_xml_compose__mobile_agent(), agent_xml_compose__task(), agent_xml_compose__tasks(), fipa_envelope_Compose(), fipa_envelope_Compose__envelope(), fipa_envelope_Compose__params(), mxml_new(), scan_file(), and sort_node().
void mxmlDelete | ( | mxml_node_t * | node | ) |
Definition at line 200 of file mxml-node.c.
References mxml_value_s::attrs, mxml_node_s::child, mxml_value_u::custom, mxml_custom_s::data, mxml_custom_s::destroy, mxml_value_u::element, MXML_CUSTOM, MXML_ELEMENT, MXML_INTEGER, MXML_OPAQUE, MXML_REAL, MXML_TEXT, mxmlDelete(), mxmlRemove(), mxml_attr_s::name, mxml_value_s::name, mxml_value_s::num_attrs, mxml_value_u::opaque, mxml_text_s::string, mxml_value_u::text, mxml_node_s::type, mxml_attr_s::value, and mxml_node_s::value.
Referenced by add_variable(), agent_datastate_Destroy(), fipa_envelope_Compose(), fipa_envelope_Parse(), main(), message_Destroy(), mxml_load_data(), mxmlDelete(), scan_file(), and sort_node().
const char* mxmlElementGetAttr | ( | mxml_node_t * | node, | |
const char * | name | |||
) |
Definition at line 48 of file mxml-attr.c.
References mxml_value_s::attrs, mxml_value_u::element, MXML_ELEMENT, mxml_attr_s::name, mxml_value_s::num_attrs, mxml_node_s::type, mxml_attr_s::value, and mxml_node_s::value.
Referenced by agent_xml_parse__agent_code(), agent_xml_parse__data(), agent_xml_parse__task(), agent_xml_parse__tasks(), fipa_envelope_HandleReceived(), index_compare(), index_find(), message_xml_parse__message(), mxml_parse_element(), mxmlFindElement(), mxmlIndexNew(), scan_file(), sort_node(), type_cb(), and write_documentation().
void mxmlElementSetAttr | ( | mxml_node_t * | node, | |
const char * | name, | |||
const char * | value | |||
) |
Definition at line 95 of file mxml-attr.c.
References mxml_value_s::attrs, mxml_value_u::element, MXML_ELEMENT, mxml_error(), mxml_value_s::name, mxml_attr_s::name, mxml_value_s::num_attrs, strdup, mxml_node_s::type, mxml_attr_s::value, and mxml_node_s::value.
Referenced by add_variable(), agent_xml_compose__agent_code(), agent_xml_compose__create_row_nodes(), agent_xml_compose__data(), agent_xml_compose__message(), agent_xml_compose__task(), agent_xml_compose__tasks(), fipa_envelope_Compose__params(), main(), mxml_parse_element(), scan_file(), sort_node(), and update_comment().
Definition at line 69 of file mxml-entity.c.
References callbacks, mxml_error(), and num_callbacks.
const char* mxmlEntityGetName | ( | int | val | ) |
Definition at line 95 of file mxml-entity.c.
Referenced by mxml_write_name(), and mxml_write_string().
int mxmlEntityGetValue | ( | const char * | name | ) |
Definition at line 125 of file mxml-entity.c.
References callbacks, and num_callbacks.
Referenced by mxml_get_entity().
void mxmlEntityRemoveCallback | ( | int(*)(const char *name) | cb | ) |
Definition at line 144 of file mxml-entity.c.
References callbacks, and num_callbacks.
mxml_node_t* mxmlFindElement | ( | mxml_node_t * | node, | |
mxml_node_t * | top, | |||
const char * | name, | |||
const char * | attr, | |||
const char * | value, | |||
int | descend | |||
) |
Definition at line 55 of file mxml-search.c.
References mxml_value_u::element, MXML_DESCEND, MXML_ELEMENT, mxmlElementGetAttr(), mxmlWalkNext(), mxml_value_s::name, mxml_node_s::next, mxml_node_s::type, and mxml_node_s::value.
Referenced by agent_xml_parse__fill_row_data(), agent_xml_parse__task(), agent_xml_parse__tasks(), fipa_envelope_HandleAclRepresentation(), fipa_envelope_HandleComments(), fipa_envelope_HandleDate(), fipa_envelope_HandleEnvelope(), fipa_envelope_HandleFrom(), fipa_envelope_HandleIntendedReceiver(), fipa_envelope_HandleParams(), fipa_envelope_HandlePayloadEncoding(), fipa_envelope_HandlePayloadLength(), fipa_envelope_HandleReceived(), fipa_envelope_HandleTo(), fipa_envelope_ParseAddresses(), fipa_envelope_ParseAgentIdentifier(), fipa_envelope_ParseResolvers(), main(), MC_LoadAgentFromFile(), message_xml_parse(), mxmlIndexNew(), scan_file(), sort_node(), write_documentation(), write_element(), xml_find_sibling(), and xml_get_child().
void mxmlIndexDelete | ( | mxml_index_t * | ind | ) |
Definition at line 62 of file mxml-index.c.
References mxml_index_s::alloc_nodes, mxml_index_s::attr, and mxml_index_s::nodes.
Referenced by main(), and mxmlIndexNew().
mxml_node_t* mxmlIndexEnum | ( | mxml_index_t * | ind | ) |
Definition at line 92 of file mxml-index.c.
References mxml_index_s::cur_node, mxml_index_s::nodes, and mxml_index_s::num_nodes.
Referenced by main(), and mxmlIndexFind().
mxml_node_t* mxmlIndexFind | ( | mxml_index_t * | ind, | |
const char * | element, | |||
const char * | value | |||
) |
Definition at line 122 of file mxml-index.c.
References mxml_index_s::attr, mxml_index_s::cur_node, index_find(), mxmlIndexEnum(), mxml_index_s::nodes, and mxml_index_s::num_nodes.
Referenced by main().
mxml_index_t* mxmlIndexNew | ( | mxml_node_t * | node, | |
const char * | element, | |||
const char * | attr | |||
) |
Definition at line 305 of file mxml-index.c.
References mxml_index_s::alloc_nodes, mxml_index_s::attr, mxml_value_u::element, index_sort(), MXML_DESCEND, mxml_error(), mxmlElementGetAttr(), mxmlFindElement(), mxmlIndexDelete(), mxml_value_s::name, mxml_index_s::nodes, mxml_index_s::num_nodes, strdup, and mxml_node_s::value.
Referenced by main().
mxml_node_t* mxmlIndexReset | ( | mxml_index_t * | ind | ) |
Definition at line 463 of file mxml-index.c.
References mxml_index_s::cur_node, mxml_index_s::nodes, and mxml_index_s::num_nodes.
Referenced by main().
mxml_node_t* mxmlLoadFd | ( | mxml_node_t * | top, | |
int | fd, | |||
mxml_type_t(*)(mxml_node_t *) | cb | |||
) |
mxml_node_t* mxmlLoadFile | ( | mxml_node_t * | top, | |
FILE * | fp, | |||
mxml_type_t(*)(mxml_node_t *) | cb | |||
) |
mxml_node_t* mxmlLoadString | ( | mxml_node_t * | top, | |
const char * | s, | |||
mxml_type_t(*)(mxml_node_t *) | cb | |||
) |
mxml_node_t* mxmlNewCustom | ( | mxml_node_t * | parent, | |
void * | data, | |||
void(*)(void *) | destroy | |||
) |
Definition at line 291 of file mxml-node.c.
References mxml_value_u::custom, mxml_custom_s::data, mxml_custom_s::destroy, MXML_CUSTOM, mxml_new(), node, and mxml_node_s::value.
Referenced by mxml_load_data().
mxml_node_t* mxmlNewElement | ( | mxml_node_t * | parent, | |
const char * | name | |||
) |
Definition at line 327 of file mxml-node.c.
References mxml_value_u::element, MXML_ELEMENT, mxml_new(), mxml_value_s::name, node, strdup, and mxml_node_s::value.
Referenced by add_variable(), agent_xml_compose__agent_code(), agent_xml_compose__agent_data(), agent_xml_compose__create_row_nodes(), agent_xml_compose__data(), agent_xml_compose__gaf_message(), agent_xml_compose__home(), agent_xml_compose__message(), agent_xml_compose__mobile_agent(), agent_xml_compose__name(), agent_xml_compose__owner(), agent_xml_compose__task(), agent_xml_compose__tasks(), agent_xml_compose__wg_code(), fipa_envelope_Compose__acl_representation(), fipa_envelope_Compose__date(), fipa_envelope_Compose__envelope(), fipa_envelope_Compose__from(), fipa_envelope_Compose__intended_receiver(), fipa_envelope_Compose__params(), fipa_envelope_Compose__payload_encoding(), fipa_envelope_Compose__to(), main(), mxml_load_data(), scan_file(), and xml_new_cdata().
mxml_node_t* mxmlNewInteger | ( | mxml_node_t * | parent, | |
int | integer | |||
) |
Definition at line 365 of file mxml-node.c.
References mxml_value_u::integer, MXML_INTEGER, mxml_new(), node, and mxml_node_s::value.
Referenced by main(), and mxml_load_data().
mxml_node_t* mxmlNewOpaque | ( | mxml_node_t * | parent, | |
const char * | opaque | |||
) |
Definition at line 396 of file mxml-node.c.
References mxml_new(), MXML_OPAQUE, node, mxml_value_u::opaque, strdup, and mxml_node_s::value.
Referenced by main(), and mxml_load_data().
mxml_node_t* mxmlNewReal | ( | mxml_node_t * | parent, | |
double | real | |||
) |
Definition at line 434 of file mxml-node.c.
References mxml_new(), MXML_REAL, node, mxml_value_u::real, and mxml_node_s::value.
Referenced by main(), and mxml_load_data().
mxml_node_t* mxmlNewText | ( | mxml_node_t * | parent, | |
int | whitespace, | |||
const char * | string | |||
) |
Definition at line 466 of file mxml-node.c.
References mxml_new(), MXML_TEXT, node, strdup, mxml_text_s::string, mxml_value_u::text, mxml_node_s::value, and mxml_text_s::whitespace.
Referenced by agent_xml_compose__create_row_nodes(), agent_xml_compose__home(), agent_xml_compose__name(), agent_xml_compose__owner(), agent_xml_compose__wg_code(), fipa_envelope_Compose__acl_representation(), fipa_envelope_Compose__date(), fipa_envelope_Compose__from(), fipa_envelope_Compose__intended_receiver(), fipa_envelope_Compose__payload_encoding(), fipa_envelope_Compose__to(), main(), mxml_load_data(), and scan_file().
mxml_node_t* mxmlNewTextf | ( | mxml_node_t * | parent, | |
int | whitespace, | |||
const char * | format, | |||
... | ||||
) |
Definition at line 510 of file mxml-node.c.
References mxml_new(), mxml_strdupf(), MXML_TEXT, node, mxml_text_s::string, mxml_value_u::text, mxml_node_s::value, and mxml_text_s::whitespace.
void mxmlRemove | ( | mxml_node_t * | node | ) |
Definition at line 557 of file mxml-node.c.
References mxml_node_s::child, mxml_node_s::last_child, mxml_node_s::next, mxml_node_s::parent, and mxml_node_s::prev.
Referenced by mxmlAdd(), and mxmlDelete().
char* mxmlSaveAllocString | ( | mxml_node_t * | node, | |
const char *(*)(mxml_node_t *, int) | cb | |||
) |
int mxmlSaveFd | ( | mxml_node_t * | node, | |
int | fd, | |||
const char *(*)(mxml_node_t *, int) | cb | |||
) |
int mxmlSaveFile | ( | mxml_node_t * | node, | |
FILE * | fp, | |||
const char *(*)(mxml_node_t *, int) | cb | |||
) |
int mxmlSaveString | ( | mxml_node_t * | node, | |
char * | buffer, | |||
int | bufsize, | |||
const char *(*)(mxml_node_t *, int) | cb | |||
) |
int mxmlSetCustom | ( | mxml_node_t * | node, | |
void * | data, | |||
void(*)(void *) | destroy | |||
) |
Definition at line 50 of file mxml-set.c.
References mxml_value_u::custom, mxml_custom_s::data, mxml_custom_s::destroy, MXML_CUSTOM, mxml_node_s::type, and mxml_node_s::value.
void mxmlSetCustomHandlers | ( | mxml_custom_load_cb_t | load, | |
mxml_custom_save_cb_t | save | |||
) |
Definition at line 457 of file mxml-file.c.
References mxml_custom_load_cb, and mxml_custom_save_cb.
int mxmlSetElement | ( | mxml_node_t * | node, | |
const char * | name | |||
) |
Definition at line 83 of file mxml-set.c.
References mxml_value_u::element, MXML_ELEMENT, mxml_value_s::name, strdup, mxml_node_s::type, and mxml_node_s::value.
void mxmlSetErrorCallback | ( | void(*)(const char *) | cb | ) |
Definition at line 472 of file mxml-file.c.
References mxml_error_cb.
int mxmlSetInteger | ( | mxml_node_t * | node, | |
int | integer | |||
) |
Definition at line 113 of file mxml-set.c.
References mxml_value_u::integer, MXML_INTEGER, mxml_node_s::type, and mxml_node_s::value.
int mxmlSetOpaque | ( | mxml_node_t * | node, | |
const char * | opaque | |||
) |
Definition at line 140 of file mxml-set.c.
References MXML_OPAQUE, mxml_value_u::opaque, strdup, mxml_node_s::type, and mxml_node_s::value.
int mxmlSetReal | ( | mxml_node_t * | node, | |
double | real | |||
) |
Definition at line 170 of file mxml-set.c.
References MXML_REAL, mxml_value_u::real, mxml_node_s::type, and mxml_node_s::value.
int mxmlSetText | ( | mxml_node_t * | node, | |
int | whitespace, | |||
const char * | string | |||
) |
Definition at line 197 of file mxml-set.c.
References MXML_TEXT, strdup, mxml_text_s::string, mxml_value_u::text, mxml_node_s::type, mxml_node_s::value, and mxml_text_s::whitespace.
int mxmlSetTextf | ( | mxml_node_t * | node, | |
int | whitespace, | |||
const char * | format, | |||
... | ||||
) |
Definition at line 229 of file mxml-set.c.
References mxml_strdupf(), MXML_TEXT, mxml_text_s::string, mxml_value_u::text, mxml_node_s::type, mxml_node_s::value, and mxml_text_s::whitespace.
mxml_node_t* mxmlWalkNext | ( | mxml_node_t * | node, | |
mxml_node_t * | top, | |||
int | descend | |||
) |
Definition at line 137 of file mxml-search.c.
References mxml_node_s::child, mxml_node_s::next, and mxml_node_s::parent.
Referenced by mxmlFindElement(), and write_element().
mxml_node_t* mxmlWalkPrev | ( | mxml_node_t * | node, | |
mxml_node_t * | top, | |||
int | descend | |||
) |
Definition at line 173 of file mxml-search.c.
References mxml_node_s::last_child, mxml_node_s::parent, and mxml_node_s::prev.