Sure you do. You cannot transform xml A into xml B without writing xml B somwhere. If you don't want to save the result in a permanent file then save it to a QBuffer or QByteArray using QXmlStreamReader/QXmlStreamWriter or DomDocument. The DomDocument option requires the QtXml module but is less effort.
Bookmarks