Search code examples
qtdomqwebelement

Set inner HTML using QDomDocument


How can I set the inner HTML in a QDomElement?

When I’m using QWebElement I have the method QWebElement::setInnerXml, there is some similar method in QDomElement?


Solution

  • There's no API to "inject" XML snippets as text into a QDomDocument (or QXmlStreamWriter). One has to use the API and create the nodes programmatically.