Results 1 to 4 of 4

Thread: generate XML file from the Graphics Scene

  1. #1
    Join Date
    Jan 2011
    Posts
    212
    Thanks
    24
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default generate XML file from the Graphics Scene

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Napoli, Italy
    Posts
    621
    Thanks
    5
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: generate XML file from the Graphics Scene

    IMHO none of them

    If you only need to write on a file, I suggest you to use QXmlStreamWriter
    A camel can go 14 days without drink,
    I can't!!!

  3. #3
    Join Date
    Jan 2011
    Posts
    212
    Thanks
    24
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: generate XML file from the Graphics Scene

    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

  4. #4
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: generate XML file from the Graphics Scene

    Use QXmlStreamReader for reading, and XmlStreamWriter for writing

Similar Threads

  1. Strange visual problem in a graphics scene
    By jano_alex_es in forum Qt Programming
    Replies: 2
    Last Post: 13th December 2009, 20:33
  2. Using QLayout for layout in a graphics scene
    By ticica in forum Qt Programming
    Replies: 1
    Last Post: 21st November 2009, 04:07
  3. graphics scene
    By dognzhe in forum Qt Programming
    Replies: 3
    Last Post: 3rd June 2009, 08:55
  4. Buttons in Graphics Scene
    By aamer4yu in forum Qt Programming
    Replies: 3
    Last Post: 28th November 2007, 19:24
  5. QTreeWidget and Graphics scene
    By aamer4yu in forum Qt Programming
    Replies: 7
    Last Post: 21st December 2006, 17:24

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.