I am creating an iPhone App in which I have to consume values from a service url.The response from url is of XML format.XML file has same name attributes many times,and those attributes are not static.I mean the no of attributes may increase from time to time. So I couldn't understand how to consume that XML response in iPhone.
My XML response looks like this :
GetUserResponse xmlns="http://schemas.datacontract.org/2004/07"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <CompanyList> <User> <Address> <City>Alabaster</City> <State>Alabama</State> </Address> <Employee> <Name>DrJohn</Name> </Employee> </User> <User> <Address> <City>SanFransisco</City>> <State>California</State> </Address> <Employee> <Name>DrWilliams</Name> </Employee> </User> </CompanyList> </GetUserResponse>
The thing is I couldn't say there will be specific number of tags as of 2 tags here.They may or may not increase from time to time.I think we should take something like count number of items and extract the values but couldn't understand how?