Results 1 to 2 of 2

Thread: Reading a XML file into an array.

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2002
    Location
    Sweden
    Posts
    43

    Question Reading a XML file into an array.

    Hi!

    I have a XML file instead of a ini file.

    The XML looks like this:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <settings poll="5000" logfile="C:\log.log">
    	<option>
    		<loglevel>3</loglevel>
    		<int>14</int>
    		<from>C:\a</from>
    		<to>C:\a\old</to>
    	</option>
    	<option>
    		<loglevel>2</loglevel>
    		<int>24</int>
    		<from>C:\b</from>
    		<to>C:\b\old</to>
    	</option>
    </settings>
    Is there a good way of reading this xml into an array?

    Cheers!

  2. #2
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    You should really load it straight into a DOM Document Object. Look into the System.Xml Namespace.

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