Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How can I Update Xml files with QT ?
Forum Updated to NodeBB v4.3 + New Features

How can I Update Xml files with QT ?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 5.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    aabc
    wrote on last edited by
    #1

    I want to write new values to some tags in an xml files. How can I do that ?

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      You are asking quite a general question. However, there are several "Qt xml examples":http://doc.qt.nokia.com/4.7/examples-xml.html available.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • A Offline
        A Offline
        aabc
        wrote on last edited by
        #3

        I will be more specific:
        For example - I want to update (real update - on the file) one attribute value on one tag in an xml file.
        How can i do this ?

        1 Reply Last reply
        0
        • K Offline
          K Offline
          koahnig
          wrote on last edited by
          #4

          I have not done it myself yet with Qt, but the "QDomDocument":http://doc.qt.nokia.com/4.7/qdomdocument.html seem to be a candidate to start with. The xml I have output was not very sophisticated. I have handled with ofstream.
          For more complex things the DOM document is in my opinion one option.
          There are the QXmlStreamReader and QXmlStreamWriter classes.

          Vote the answer(s) that helped you to solve your issue(s)

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved