Search code examples
androidxml-parsingandroid-xmlandroid-parser

Android XML Parsing link error


I have an xml file generated dynamically through a php code section.I need this xml file to be read inside my android application.Can anybody suggest a method for the same?

The xml file just looks like :

<?xml version="1.0" encoding="UTF-8"?>
<root>
<Buyer>
<buyerId>27</buyerId>
<name>321</name>
<country>Albania</country>
<emailId>[email protected]</emailId>
<password>444</password>
<address>234
</address>
<city>33</city>
<state>333</state>
<zip>2222</zip>
<phone>33</phone>
<accountstatus>1</accountstatus>
<userType>buyer</userType>
</Buyer>
</Root>

Solution

  • http://www.ibm.com/developerworks/opensource/library/x-android/ that is a great starter for parsing XML. They mention a couple of different ways.

    Another simple example: http://www.anddev.org/parsing_xml_from_the_net_-_using_the_saxparser-t353.html

    Otherwise check out these answers: ANDROID: Parsing XML

    Android: Best XML Parsing Library?

    Android xml parsing