Results 1 to 3 of 3

Thread: Import XML data into project?

  1. #1

    Thread Starter
    Frenzied Member dolot's Avatar
    Join Date
    Nov 2007
    Location
    Ancient City, U.S.
    Posts
    1,254

    Import XML data into project?



    I know this sounds like a newb question, but...

    Is there a way to import an xml file into a vb project and have the structure and data visible? I'm wanting to create a data structure within my project that has all the data from the xml files already compiled in. The data in the xml file is static reference data that never changes, and my project lead doesn't want to put it in the database or distribute the xml file.

    I'm just wondering if there's an easy way instead of manually building an array line by line - there are hundreds of data elements.

    Any insight would helpful.

    Thanks!
    I always add to the reputation of those whose posts are helpful, and even occasionally to those whose posts aren't helpful but who obviously put forth a valiant effort. That is, when the system will allow it.
    My war with a browser-redirect trojan

  2. #2
    PowerPoster cicatrix's Avatar
    Join Date
    Dec 2009
    Location
    Moscow, Russia
    Posts
    3,654

    Re: Import XML data into project?

    Wait? You want to hardcode the data into the executable?
    In this case just script it. Write a script that reads your XML and outputs vb code. If you need to code many similar code elements you can use some spreadsheet to 'generate' the code you want. Simply open your XML in Excel or Calc and use its formulas to convert the XML tags into code.

  3. #3

    Thread Starter
    Frenzied Member dolot's Avatar
    Join Date
    Nov 2007
    Location
    Ancient City, U.S.
    Posts
    1,254

    Re: Import XML data into project?

    That's what I was afraid somebody would say - write a script to generate the code - although the idea of using Excel sounds fascinating. I may play with that some.

    Thanks.
    I always add to the reputation of those whose posts are helpful, and even occasionally to those whose posts aren't helpful but who obviously put forth a valiant effort. That is, when the system will allow it.
    My war with a browser-redirect trojan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width