Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. XML read/write simultaneously
Forum Updated to NodeBB v4.3 + New Features

XML read/write simultaneously

Scheduled Pinned Locked Moved Solved Mobile and Embedded
6 Posts 3 Posters 1.1k 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.
  • S Offline
    S Offline
    Sherlin N G
    wrote on 13 Feb 2018, 13:05 last edited by
    #1

    How to XML read/write simultaneously?

    R 1 Reply Last reply 13 Feb 2018, 14:59
    0
    • S Sherlin N G
      13 Feb 2018, 13:05

      How to XML read/write simultaneously?

      R Offline
      R Offline
      raven-worx
      Moderators
      wrote on 13 Feb 2018, 14:59 last edited by
      #2

      @Sherlin-N-G
      you need to be more specific what you want to do...
      Reading/writing from/to a file or stream, etc?

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      S 1 Reply Last reply 14 Feb 2018, 04:40
      2
      • R raven-worx
        13 Feb 2018, 14:59

        @Sherlin-N-G
        you need to be more specific what you want to do...
        Reading/writing from/to a file or stream, etc?

        S Offline
        S Offline
        Sherlin N G
        wrote on 14 Feb 2018, 04:40 last edited by
        #3

        @raven-worx I'm working on a project in which user enters some values in the ui to run the application and these values should be written on the xml file(which i was able to do with DOM) and the user has an option to load a default xml file and the values from this xml file should be read in my ui and user can make some changes and these changes should be written on my XML.
        I'm able to do read and write of xml using dom but not simultaneously.

        J 1 Reply Last reply 14 Feb 2018, 07:59
        0
        • S Sherlin N G
          14 Feb 2018, 04:40

          @raven-worx I'm working on a project in which user enters some values in the ui to run the application and these values should be written on the xml file(which i was able to do with DOM) and the user has an option to load a default xml file and the values from this xml file should be read in my ui and user can make some changes and these changes should be written on my XML.
          I'm able to do read and write of xml using dom but not simultaneously.

          J Offline
          J Offline
          JonB
          wrote on 14 Feb 2018, 07:59 last edited by
          #4

          @Sherlin-N-G
          It still depends on just what you mean by "simultaneously". But the the normal way I would expect is that you read in the whole of an XML document into DOM, closing the file, do whatever editing, and finally write the new DOM back as a whole to the same/new file.

          1 Reply Last reply
          1
          • S Offline
            S Offline
            Sherlin N G
            wrote on 14 Feb 2018, 09:40 last edited by
            #5

            @raven-worx How do I create a new xml file when some editing is done for the loaded XML file through the UI.

            R 1 Reply Last reply 14 Feb 2018, 09:44
            0
            • S Sherlin N G
              14 Feb 2018, 09:40

              @raven-worx How do I create a new xml file when some editing is done for the loaded XML file through the UI.

              R Offline
              R Offline
              raven-worx
              Moderators
              wrote on 14 Feb 2018, 09:44 last edited by
              #6

              @Sherlin-N-G said in XML read/write simultaneously:

              How do I create a new xml file when some editing is done for the loaded XML file through the UI.

              • QDomDocument::toByteArray()
              • write the bytearray to a QFile opened in QIODevice::WriteOnly mode

              --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
              If you have a question please use the forum so others can benefit from the solution in the future

              1 Reply Last reply
              2

              4/6

              14 Feb 2018, 07:59

              • Login

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