Parse a xml to get information



I have a xml file witch is like that:



<?xml version="1.0" ?>
<settings>
<place country="Canada" region="Quebec" city="Montreal" />
</settings>
<cards>
<command type="Item 1" number="auto" url="http://www.url1.com" />
<command type="Item 2" number="auto" url="http://www.url2.com" />
<command type="Item 3" number="auto" url="http://www.url3.com" />
</cards>


How can I paste this file to get:




  • The settings informations (Canada, Quebec, Montreal)




  • The cards informations for making a foreach.




Thanks a lot for any help or clue.


No comments:

Post a Comment