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. Reading Log from XML without reading whole file
Forum Updated to NodeBB v4.3 + New Features

Reading Log from XML without reading whole file

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 789 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.
  • Zee_07Z Offline
    Zee_07Z Offline
    Zee_07
    wrote on last edited by
    #1

    I have an log file in XML format in which the log entry (fixed format) are inserted at irregular interval of time .
    so I want to show all the log entry into table view and whenever the new log entry is appended to the file,
    it should be appended to the table view also.
    I am able to do this by reading the whole XML file after fixed interval of time or whenever the XML file is edited. But the performance is degraded (taking too much time) when too many log entries present in XML file.

    Please suggest me is there any way to read only appended log entry in XML file rather than reading whole file.

    Thanks and Kind Regards,
    Zee_07

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Remember the position where the file ended last time (line number, for example), and then read from there using seek() functions.

      (Z(:^

      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