I have an XML Document I want to create a method that will parse the XML which is in Document format to String and ret开发者_StackOverflow中文版urn the Strings . How can I do this..Please help me out as I am very new to Android and XML as well.Thanks in advance.
I am trying to do something like this----
public static String getStringFromXML(Document doc){
String data;
................
................
................
...............
return data;
}
Look at this article there are several examples on howto use SAX, DOM and PULL parsers
Working with XML on Android
You should use the given blow link and get idea how to parse xml in android then make function according to your requirement.
http://www.androidpeople.com/android-xml-parsing-tutorial-using-saxparser
[This is the another like is usfull to you for finding solution of your problem]
http://www.androidpeople.com/android-xml-parsing-tutorial-%E2%80%93-using-domparser
精彩评论