tags:

views:

25

answers:

1

i got an QXmlStreamWriter and add some xml to it. when i do it first time its ok, but when i want to add text at end of file it dont work.

the only thing i got is first few lines i wrote good and formatted xml and the second thing i wrote is everything on 1 line. :S

how to fix this?

A: 

Use following code if you see all the XML file in one line. (I think you mean you get all the file in one line.)

QXmlStreamWriter stream(&file);
stream.setAutoFormatting(true);
stream.setAutoFormattingIndent(2);
Dahiya