Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Backward reading of a file in C#

Backward reading of a file in C#

Scheduled Pinned Locked Moved C#
csharpxmlperformance
4 Posts 3 Posters 0 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.
  • P Offline
    P Offline
    Praveen Raghuvanshi
    wrote on last edited by
    #1

    I have an XML file that may go upto 1GB and may contaion 5 lakh records. I wanted to retrieve last or latest 3000 records. I was trying to use XmlTextReader, but was a fail. Is there any way by which i can read from end of a XML file and get all the details taking into account of performance. Thanks in advance

    Praveen Raghuvanshi Software Engineer,

    E 1 Reply Last reply
    0
    • P Praveen Raghuvanshi

      I have an XML file that may go upto 1GB and may contaion 5 lakh records. I wanted to retrieve last or latest 3000 records. I was trying to use XmlTextReader, but was a fail. Is there any way by which i can read from end of a XML file and get all the details taking into account of performance. Thanks in advance

      Praveen Raghuvanshi Software Engineer,

      E Offline
      E Offline
      Eduard Keilholz
      wrote on last edited by
      #2

      Use xPath, it's the quickest method of reading xml. However if you only need the latest 3000 records, i'd recommend creating a temp-file like construction in order to read the required data only.

      .: I love it when a plan comes together :. http://www.zonderpunt.nl

      P 1 Reply Last reply
      0
      • E Eduard Keilholz

        Use xPath, it's the quickest method of reading xml. However if you only need the latest 3000 records, i'd recommend creating a temp-file like construction in order to read the required data only.

        .: I love it when a plan comes together :. http://www.zonderpunt.nl

        P Offline
        P Offline
        Praveen Raghuvanshi
        wrote on last edited by
        #3

        Thanks Eduard for your reply..... could you please elaborate or send me a link for xPath and the other solution described by you. Also, how i will be reading the find from end....

        Praveen Raghuvanshi Software Engineer

        N 1 Reply Last reply
        0
        • P Praveen Raghuvanshi

          Thanks Eduard for your reply..... could you please elaborate or send me a link for xPath and the other solution described by you. Also, how i will be reading the find from end....

          Praveen Raghuvanshi Software Engineer

          N Offline
          N Offline
          nikneem2005
          wrote on last edited by
          #4

          xPath is supported by the .NET framework in the namespace System.XML.XPath. You can find loads of manuals, how-to's and articles around the web.


          I love it when a plan comes together

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups