View Single Post
  #1  
Old 07-23-2007, 04:30 PM
Too_Tall_Crown_Victoria Too_Tall_Crown_Victoria is online now
Registered User
 
Join Date: 01-15-2003
Posts: 44
Loop over a generic XML file

I have an xml file that I need to loop over. The xml.bld example shows how to loop on attributes of a node. I need to loop on the contents of sub nodes. For example:

<dependencies>
<component>
<name>ProjA</name>
<version>1.2.3</version>
</component>
<component>
<name>ProjB</name>
<version>2.3.4</version>
</component>
</dependencies>

Is there a simple way to set this up and loop on each component and retrieve it's cooresponding version number?

Thanks

Tom
Reply With Quote