diff options
author | defanor <defanor@uberspace.net> | 2023-09-05 22:45:26 +0300 |
---|---|---|
committer | defanor <defanor@uberspace.net> | 2023-09-07 18:00:36 +0300 |
commit | 1e01dbfc114e4ff96c428d1db38a4908ba8d0438 (patch) | |
tree | c36d4db88486de75285f346c4679bf6e934a7715 /examples/basic.c | |
parent | 39b84f12e7f0488157eb64261c8585927a91e194 (diff) |
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.
Diffstat (limited to 'examples/basic.c')
-rw-r--r-- | examples/basic.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |