PDA

View Full Version : generate XML file from the Graphics Scene



sajis997
13th April 2011, 14:07
Hello forum,


I have a customized graphics scene containing several graphics items inside it.


I want to save the scene in the xml file so that all the items related information will be stored in the xml file. The scene could range from very small to very large.

Which one is a better option SAX or DOM?


Regards
Sajjad

mcosta
13th April 2011, 14:15
IMHO none of them

If you only need to write on a file, I suggest you to use QXmlStreamWriter

sajis997
13th April 2011, 15:11
Hello mcosta,

I believe if i have to parse the very same generated file and render the item in the graphics scene i shall have to use QXmlStreamWriter.

Isnt it?


Regards
Sajjad

stampede
13th April 2011, 15:14
Use QXmlStreamReader (http://doc.trolltech.com/latest/qxmlstreamreader.html) for reading, and XmlStreamWriter for writing :)