Results 1 to 2 of 2

Thread: Editing xml files

  1. #1
    Join Date
    Nov 2012
    Posts
    22
    Thanks
    1

    Default Editing xml files

    Hi,

    I want to edit an xml file in a Qt application and am wondering what would be the best way to do this.
    In the past I've usually used other libraries for this (tinyxml for example) but would like to take the opportunity now to learn more about Qts xml support.

    Some considerations:
    Seaching for Qt+xml leads me here: http://qt-project.org/doc/qt-5/qtxml-index.html .
    The DOM classes included in that module seem to be pretty much what I'm looking for (my xml files are not large).
    However, the module includes the hint that it is no longer maintained and the QXmlStreamReader/Writer classes should be used.
    I am not familiar with those classes but the approach there seems similar to SAX.
    If so, I would assume these classes may be able to parse/generate XML nicely but editing should be quite difficult (due to the event driven approach, i.e. no DOM tree).
    Which method would you recommend in my case for editing xml files (and for what reason)?
    Is there a third way to do this in Qt which I may have missed?

    Best,
    xdn

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Editing xml files

    If you are accustomed to working with a DOM tree, use the DOM tree.

    Cheers,
    _

Similar Threads

  1. Replies: 1
    Last Post: 20th March 2014, 10:36
  2. Replies: 12
    Last Post: 17th June 2009, 05:34
  3. About Editing QtreeWidget
    By nikhilqt in forum Qt Programming
    Replies: 1
    Last Post: 22nd January 2008, 13:51
  4. Replies: 5
    Last Post: 18th July 2006, 22:31

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.