(continuing http://www.qtcentre.org/threads/6000...-and-sub-nodes )
I am using QXmlStreamWriter, and under some conditions I need to write into a node, a text that contains raw xml, not encoded.
Qt Code:
QXmlStreamWriter stream(&output); stream.writeStartDocument(); stream.writeStartElement("a"); stream.writeCharacters(b); stream.writeEndElement(); stream.writeEndDocument(); stream.close();To copy to clipboard, switch view to plain text mode
In this example, "b" gets encoded into XML, which is usually desired, but not in this case.
One solution I have is to write the XML manually as a text file. This will work, but I feel this is ugly.
What other alternatives to I have?
Bookmarks