QXmlStreamReader split xml

  • I have an XML file that I read with QXmlStreamReader, but in the need to split the structure and content of an xml node and children. I like doing this with QXmlStreamReader or do I have to use QDomDocument?



  • Hi,

    By "split the structure and content of an xml node and children" you mean you want to write these in a separate xml file, removing them from your original file? In that case, you could probably use two QXmlStreamWriters along with your QXmlStreamReader to write two new xml files. That can get a little messy, so QDomDocument could probably be more convenient.

    If by splitting you mean that you want to restructure your xml file (create new nodes, etc), then you would need one QXmlStreamWriter while reading your original file.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.