Import XML data into project?
:wave:
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!
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.
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. :thumb: