Using QXMLWriter APIs, I wonder how to write an empty element (nothing between Start() and End() calls)?
Expected result is : <element></element>
Thanks;
Mut.
Using QXMLWriter APIs, I wonder how to write an empty element (nothing between Start() and End() calls)?
Expected result is : <element></element>
Thanks;
Mut.
Most XML writing APIs will not generate that but go for the more compact empty element syntax, i.e. <element />
But you can achieve that with QXmlStreamWriter::writeTextElement() and passing an empty string as the text to write.
What is your reason for needing the non-compact form?
Cheers,
_
Bookmarks