I am new to programming and this is my first project so I don’t have much idea about xml parsing etc.
I need to parse an xml document like…
<TLMS><TLMSResponse status="SUCCESS">
<books>
<book>
<name>abc</name>
<author>DEF</author>
<publisher>HIJ</publisher>
</book>
<book>
<name>xyz</name>
<author>rus</author>
<publisher>tuv</publisher>
</book>
</books>
</TLMSResponse></TLMS>
I have tried a lot but haven’t found any good de-serializer that can parse this xml and make objects of “Book” class.
Any help is greatly appreciated…
Thank You all
Here’s an example class implementing the
NSXMLParserDelegateprotocol.It would parse this xml:
into an array of dictionaries, each dictionary is a “book” from the xml with keys for each tag and the text between that tag as the value for the key. So this is how the
returnDatain[_delegate acceptParsedData:[returnData autorelease] withIdent:ident];would look like:JHXMLParser.h
JHXMLParser.m