QXmlQuery change node found by XPath query
<p>I have a html tree and want to alter some attributes e.g. <code>style</code> of all nodes found by an QXmlQuery.</p>

<p>My code looks like this:</p>

<pre><code>QXmlQuery query;
query.setFocus(data);
query.setQuery(xpathSelector);
QXmlResultItems result;
if (query.isValid()) {
    query.evaluateTo(&amp;result);
    QXmlItem item(result.next());
    while (!item.isNull()) {
        if (item.isNode()) {
            // alter the node here &lt;--
        }
        item = result.next();
    }

    if (result.hasError()) {
        /* Runtime error! */
    }
}
</code></pre>

<p>How can I change attributes of a node in <code>QXmlResultItems</code>?</p>