DynDeveloper.com

DynDeveloper.com

Sign Up Now! Log In
BethanyW 12/18/2007 5:22:00 PM

Iterating through an XML file

Given the XML structure:

<employees>
<employee>
 <firstname>John</firstname>
 <lastname>Doe</lastname>
</employee>
<employee>
 <firstname>James</firstname>
 <lastname>Buck</lastname>
</employee>
<employees>

 

 

I sometimes need to loop (iterate) through the file and gather the first/last names

Here is a piece of code that will do that

 

Version: Unknown or N/A
Section: Off Topic