From 1e01dbfc114e4ff96c428d1db38a4908ba8d0438 Mon Sep 17 00:00:00 2001 From: defanor Date: Tue, 5 Sep 2023 22:45:26 +0300 Subject: Implement XML serialization in C and in Rust Continuing replacement of libxml2, planning to use libexpat or a Rust XML parser as an alternative for XML parsing. --- examples/basic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/basic.c b/examples/basic.c index 66c54f6..0b77145 100644 --- a/examples/basic.c +++ b/examples/basic.c @@ -68,7 +68,7 @@ int my_sasl_property_cb (rexmpp_t *s, rexmpp_sasl_property prop) { /* An XML in callback, printing what was received. */ int my_xml_in_cb (rexmpp_t *s, rexmpp_xml_t *node) { - char *xml_buf = rexmpp_xml_serialize(node); + char *xml_buf = rexmpp_xml_serialize(node, 0); printf("recv: %s\n", xml_buf); free(xml_buf); return 0; @@ -76,7 +76,7 @@ int my_xml_in_cb (rexmpp_t *s, rexmpp_xml_t *node) { /* An XML out callback, printing what is about to be sent. */ int my_xml_out_cb (rexmpp_t *s, rexmpp_xml_t *node) { - char *xml_buf = rexmpp_xml_serialize(node); + char *xml_buf = rexmpp_xml_serialize(node, 0); printf("send: %s\n", xml_buf); free(xml_buf); return 0; -- cgit v1.2.3