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. best way to program a huge xml file

best way to program a huge xml file

Scheduled Pinned Locked Moved C#
xmlquestion
6 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.
  • B Offline
    B Offline
    brsecu
    wrote on last edited by
    #1

    I have to write a program converting a csv file into a huge xml file, about 100 elements. Is the best way to just create a class xmlfile.cs then read the info from another class pass the values to xmlfile one by one, then when done use xmlwriter, in the same class, to write the whole file? Is there a better way? Thanks

    J J 2 Replies Last reply
    0
    • B brsecu

      I have to write a program converting a csv file into a huge xml file, about 100 elements. Is the best way to just create a class xmlfile.cs then read the info from another class pass the values to xmlfile one by one, then when done use xmlwriter, in the same class, to write the whole file? Is there a better way? Thanks

      J Offline
      J Offline
      Judah Gabriel Himango
      wrote on last edited by
      #2

      There are several CSV parsers on this site, have you searched them? Generating the XML...I guess fill them into an array and serialize that using an XML serializer. Will that work?

      Tech, life, family, faith: Give me a visit. I'm currently blogging about: Minnesota Bridge Collapses The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

      B 1 Reply Last reply
      0
      • J Judah Gabriel Himango

        There are several CSV parsers on this site, have you searched them? Generating the XML...I guess fill them into an array and serialize that using an XML serializer. Will that work?

        Tech, life, family, faith: Give me a visit. I'm currently blogging about: Minnesota Bridge Collapses The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

        B Offline
        B Offline
        brsecu
        wrote on last edited by
        #3

        Yes I have seen and practiced with a couple. It may be more overhead but i actually like using the excel object to parse the files I find it to be easier and it works better in my head. Thanks

        J 1 Reply Last reply
        0
        • B brsecu

          Yes I have seen and practiced with a couple. It may be more overhead but i actually like using the excel object to parse the files I find it to be easier and it works better in my head. Thanks

          J Offline
          J Offline
          Judah Gabriel Himango
          wrote on last edited by
          #4

          Ok. Is your question answered, then, regarding serializing the CSVs to XML file?

          Tech, life, family, faith: Give me a visit. I'm currently blogging about: I Plead (audio) The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

          B 1 Reply Last reply
          0
          • J Judah Gabriel Himango

            Ok. Is your question answered, then, regarding serializing the CSVs to XML file?

            Tech, life, family, faith: Give me a visit. I'm currently blogging about: I Plead (audio) The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

            B Offline
            B Offline
            brsecu
            wrote on last edited by
            #5

            Yes i am new to xml and serialization is a much better way than i was doing. Thanks again

            1 Reply Last reply
            0
            • B brsecu

              I have to write a program converting a csv file into a huge xml file, about 100 elements. Is the best way to just create a class xmlfile.cs then read the info from another class pass the values to xmlfile one by one, then when done use xmlwriter, in the same class, to write the whole file? Is there a better way? Thanks

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

              you may also want to look at vtd-xml http://vtd-xml.sf.net

              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