Results 1 to 4 of 4

Thread: Attributes order in QDomElement

  1. #1
    Join Date
    Mar 2009
    Location
    Russia, Nizhny Novgorod
    Posts
    17
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Attributes order in QDomElement

    Hello all,

    Can I do something with attributes' order in QDomElement? I'm adding new attribute by setAttribute() member and I have attributes in non predictable order(I see no reason in such order). Is it possible to control this order or I should accept unpredictable attribute order?

    Regards

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Attributes order in QDomElement

    What do you mean by unpredictable? You mean that if you run the same application a few times you get a different order of attributes each time?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Mar 2009
    Location
    Russia, Nizhny Novgorod
    Posts
    17
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Attributes order in QDomElement

    No, I have the same order always. But I can't predict this order before I run the application at least once. I need to know the order because I want to compare XML file created via QDomDocument with my etalon XML file, but if I have the different order I won't able to have a right comparison result.

  4. #4
    Join Date
    Aug 2009
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Attributes order in QDomElement

    A round about solution is to use XQuery to extract the XML Nodes. Here the attributes are retrieved in the same order as in the Physical file.

Similar Threads

  1. QFileDialog filename list order
    By joelthelion in forum Qt Programming
    Replies: 1
    Last Post: 28th January 2009, 14:58
  2. Order of include files [c++ related]
    By Lykurg in forum Newbie
    Replies: 1
    Last Post: 10th November 2008, 12:56
  3. QTreeView: get current sort column and order
    By supergillis in forum Qt Programming
    Replies: 1
    Last Post: 14th October 2008, 17:25
  4. QDomElement
    By sabeesh in forum Qt Programming
    Replies: 4
    Last Post: 20th September 2007, 12:55
  5. Tab Order Settings in a QDialog widgets
    By vinnu in forum Qt Programming
    Replies: 10
    Last Post: 21st September 2006, 16:25

Tags for this Thread

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.