Hi I have some troubles serializing a node and its subtree to a file.
I'm using the following code: axiom_xml_writer_t *xml_writer = NULL; axiom_output_t *om_output = NULL; xml_writer = axiom_xml_writer_create(env, filename, "UTF-8", 0,0); om_output = axiom_output_create(env, xml_writer); AXIOM_NODE_SERIALIZE(node, env, om_output); AXIOM_OUTPUT_FREE(om_output, env); This should be almost the same as in the OM tutorial, no? The problem with that is, that the files are written only partially. Sometimes it creates a empty file, sometimes it writes 2/3 what it should. I should mention that I call the function multiple times with different subnodes of the same document. Most of the time the first document is empty and the second one contains a not finished xml stream. E.g: <blablabla>buh buh buh<blabl Additionally I see memory leaks within these calls: I can report these in Jira if wished... 8,468 (80 direct, 8,388 indirect) bytes in 2 blocks are definitely lost in loss record 23 of 59 ==24537== at 0x400690F: malloc (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so) ==24537== by 0x4C58FDB2: xmlNewTextWriter (in /usr/lib/libxml2.so.2.6.26) ==24537== by 0x4C59002C: xmlNewTextWriterFilename (in /usr/lib/libxml2.so.2.6.26) ==24537== by 0x4060022: axiom_xml_writer_create (libxml2_writer_wrapper.c:370) Btw: In the OM tutorial the function axiom_xml_writer_create_for_file is listed which doesn't exist in the sources. Shouldn't that be axiom_xml_writer_create as I used above? Thanks Marc --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
