I have an XML file containing some data that I would like to use:
<?xml version="1.0" encoding="UTF-8" ?> <items> <item name="product" price="19.95" where="store"> This is the first product. </item> <item name="product2" price="39.95" where="online"> This is the second product. </item> <item name="product3" price="99.95" where="garagesale"> This is the third product. </item> </items>
If I made 4 arrays, one for the name, one for the price, one for where it was purchased, and one for its description, how will I get the data into arrays?
I decided to use NSXMLParser but could not get name
, price
, where
or description.
I was fixated on how to do this.
Any help was appreciated.
Jack greenhill
source share