How can I parse such xml, having one node and different arguments in it using NSXMLParser?
<vendorlist>
<statusdescription>success</statusdescription>
<statuscode>200</statuscode>
<statistic vendor_count="1" page="1" page_count="1"/>
<vendor id="1581" name="Islan Name is here" street="The address is here" state="USVI" zip="802" phone1="340-774-3944" phone2="" email="example@abcd.org" website1="" website2="" longitude="" latitude="" description="this is very important discription here, for this vendor" picture_img="http://igy.match3win.com/img/picture/NULL" logo_img="http://igy.match3win.com/img/logo/1581.jpg"/>
</vendorlist>
Here Vendor has different parameters in it, so how can parse it using nsxmlparser?
When using NSXMLParser, your delegate will implement the method
parser:didStartElement:namespaceURI:qualifiedName:attributes:. When it’s called with element name of “vendor”,attributeswill be aNSDictionarywith the “parameters”. Looking for missing parameters in the dictionary will returnnil.The official documentation has a XML Programming Guide with lots of example code, including on how to handle elements and attributes.