I want a common Parser which parse any type of XMl response.
At present I am using XmlPullParser.. in which I am passing xmlresponse from webservice and checking XmlPullParser.START_TAG and store data in the Beans Object accordingly..
for that I am creating one bean, one parser for each of the webservice I am parsing..
I’ve gone through one common parser over iOS App which input all the start tag as array to any webservice and storing data in key-value pair, and gives one object which contains all the data.. so no need of creating Bean and Parser separately..
Common class for XML is the nice idea. I have created a demo to make a common XML parser class.
To create a common class there can be many ways,It depends on your requirement. Some persons want to get the KeyValuePair like you are referencing in your question or some wants different ways.
I have create one XML parser class which will parse the xml file and will return object. This object can have multiple childs.
You can get the code from this blog.
Hope this will help everyone.