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. XML / XSL
  4. Searching HUGE XML file

Searching HUGE XML file

Scheduled Pinned Locked Moved XML / XSL
helpcsharpalgorithmsxml
4 Posts 4 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.
  • A Offline
    A Offline
    adityap
    wrote on last edited by
    #1

    Hi, I have a very huge XML file ( around 30 MB in size).. The problem is i need to search nodes( many of them, basically BFS) XML file contains data in linear fashion.. now searhing around 30,000 nodes takes long time... can any one suggest which class could i use here to obtain faster results.. i am confused with all the xml classes .NET provides.. as to which class's object would solve my purpose... probably some code snippets supporting your answer would be of great help:) Thanks techno_adi -- modified at 11:33 Thursday 20th April, 2006

    G R J 3 Replies Last reply
    0
    • A adityap

      Hi, I have a very huge XML file ( around 30 MB in size).. The problem is i need to search nodes( many of them, basically BFS) XML file contains data in linear fashion.. now searhing around 30,000 nodes takes long time... can any one suggest which class could i use here to obtain faster results.. i am confused with all the xml classes .NET provides.. as to which class's object would solve my purpose... probably some code snippets supporting your answer would be of great help:) Thanks techno_adi -- modified at 11:33 Thursday 20th April, 2006

      G Offline
      G Offline
      Graham Nimbley
      wrote on last edited by
      #2

      :omg: That's a large amount of XML data! Since its such a large file, I would advise against using XmlDocument or DataSet which will load the entire data into memory. Instead you need to use an XmlReader, which only provides one way access to maximise performance. I'll quote from MSDN: "Represents a reader that provides fast, non-cached, forward-only access to XML data.".

      1 Reply Last reply
      0
      • A adityap

        Hi, I have a very huge XML file ( around 30 MB in size).. The problem is i need to search nodes( many of them, basically BFS) XML file contains data in linear fashion.. now searhing around 30,000 nodes takes long time... can any one suggest which class could i use here to obtain faster results.. i am confused with all the xml classes .NET provides.. as to which class's object would solve my purpose... probably some code snippets supporting your answer would be of great help:) Thanks techno_adi -- modified at 11:33 Thursday 20th April, 2006

        R Offline
        R Offline
        Richard Parsons
        wrote on last edited by
        #3

        Speaking from personal experience, I would suggest moving the data to a database instead of using XML files that are that large. I did a project that started out by having a pure XML backend but as the files grew I ran into the same problem you are having. We ended up using Access for simplicity and later moved to MySQL because it was a free database our clients could run. Just my 2 cents. -Richard

        1 Reply Last reply
        0
        • A adityap

          Hi, I have a very huge XML file ( around 30 MB in size).. The problem is i need to search nodes( many of them, basically BFS) XML file contains data in linear fashion.. now searhing around 30,000 nodes takes long time... can any one suggest which class could i use here to obtain faster results.. i am confused with all the xml classes .NET provides.. as to which class's object would solve my purpose... probably some code snippets supporting your answer would be of great help:) Thanks techno_adi -- modified at 11:33 Thursday 20th April, 2006

          J Offline
          J Offline
          Jimmy Zhang
          wrote on last edited by
          #4

          I think you might want to look at vtd-xml it is ideally designed to do what you described..

          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