diff options
author | defanor <defanor@uberspace.net> | 2023-09-07 14:32:41 +0300 |
---|---|---|
committer | defanor <defanor@uberspace.net> | 2023-09-07 18:03:30 +0300 |
commit | e3d8e7d63bb3e1ccd38ce5ca8ca9c94f995612d6 (patch) | |
tree | da034f90f6365edaf15c87cd7996fa339ffeded5 /src/rexmpp_xml.h | |
parent | 1e01dbfc114e4ff96c428d1db38a4908ba8d0438 (diff) |
Build rexmpp_xml_t directly on SAX parsing
Afterwards it is used for the input queue, too.
Diffstat (limited to 'src/rexmpp_xml.h')
-rw-r--r-- | src/rexmpp_xml.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/rexmpp_xml.h b/src/rexmpp_xml.h index 0a3cb63..972c75c 100644 --- a/src/rexmpp_xml.h +++ b/src/rexmpp_xml.h @@ -94,6 +94,12 @@ xmlNodePtr rexmpp_xml_to_libxml2_list (rexmpp_xml_t *from); rexmpp_xml_t *rexmpp_xml_new_text (const char *str); /** + @brief Creates a textual ::rexmpp_xml_t XML node (with type = + ::REXMPP_XML_TEXT). +*/ +rexmpp_xml_t *rexmpp_xml_new_text_len (const char *str, size_t len); + +/** @brief Creates an element ::rexmpp_xml_t XML node (with type = ::REXMPP_XML_ELEMENT). */ @@ -112,6 +118,13 @@ void rexmpp_xml_add_child (rexmpp_xml_t *node, int rexmpp_xml_add_text (rexmpp_xml_t *node, const char *str); +/** + @brief Creates a text node, and adds it as a child. +*/ +int rexmpp_xml_add_text_len (rexmpp_xml_t *node, + const char *str, + size_t len); + rexmpp_xml_attr_t *rexmpp_xml_attr_new (const char *name, const char *namespace, const char *value); @@ -233,4 +246,7 @@ rexmpp_xml_t *rexmpp_xml_parse (const char *str, int str_len); rexmpp_xml_t *rexmpp_xml_read_file (const char *path); int rexmpp_xml_write_file (const char *path, rexmpp_xml_t* node); +rexmpp_xml_t *rexmpp_xml_reverse (rexmpp_xml_t *node); +rexmpp_xml_t *rexmpp_xml_reverse_all (rexmpp_xml_t *node); + #endif |