I want to append a QDomText which is a QStringList to an existing QDomElement. Currently I use the following:
QDomText text
= doc.
createTextNode(strList.
join("\n"));
element.appendChild(text);
element.setAttribute("size", strList.size());
QDomText text = doc.createTextNode(strList.join("\n"));
element.appendChild(text);
element.setAttribute("size", strList.size());
To copy to clipboard, switch view to plain text mode
So for this example the output would be:
<node1>
<data>
<element size="4" >Article1
Article2
Article3
Article4</element>
</data>
</node1>
<node1>
<data>
<element size="4" >Article1
Article2
Article3
Article4</element>
</data>
</node1>
To copy to clipboard, switch view to plain text mode
I want to make it better readable, so my question is how can i use these functions to produce:
<node1>
<data>
<element size="4" >
Article1
Article2
Article3
Article4
</element>
</data>
</node1>
<node1>
<data>
<element size="4" >
Article1
Article2
Article3
Article4
</element>
</data>
</node1>
To copy to clipboard, switch view to plain text mode
Is there a beautifier within the QtXml which i couldn't found? I seem to remember that xerces will do so.
How can i do so with standard Qt tools?
Regards
Bookmarks