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

XML read/write simultaneously

Scheduled Pinned Locked Moved Solved Mobile and Embedded
6 Posts 3 Posters 1.1k Views
  • 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 last edited by
    #1

    How to XML read/write simultaneously?

    raven-worxR 1 Reply Last reply
    0
    • S Sherlin N G

      How to XML read/write simultaneously?

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on 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
      2
      • raven-worxR raven-worx

        @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 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.

        JonBJ 1 Reply Last reply
        0
        • S Sherlin N G

          @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.

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on 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 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.

            raven-worxR 1 Reply Last reply
            0
            • S Sherlin N G

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

              raven-worxR Offline
              raven-worxR Offline
              raven-worx
              Moderators
              wrote on 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

              • Login

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