Important: Please read the Qt Code of Conduct -


  • I am building a simple app in Qt 4.7 that uses QDomDocument to build xml files, the node content can actually contain html tags, like for example <br/> when I pass such string into createTextNode the '<' characters is correctly escape with &lt;, but the ending /> is left as is instead of being replaced with /&gt;. Is there a way to fix this?

  • This behavior is ok and creates a valid XML document. It's not needed to quote the ending > with > outside a CDATA section, according to the "XML standard":

    To answer your last question: No, there is no way to change this.

Log in to reply