我有一个XML文档,我想创建,它将分析这是在文档格式字符串的XML并返回字符串的方法。我该怎么办this..Please帮助我,因为我很新的Android和XML作为well.Thanks提前。
我试图做这样的事情----
公共静态字符串getStringFromXML(DOC文件){
字符串数据;
................
................
................
...............
返回的数据;
}
解决方案
看看这篇文章有关于如何使用它们SAX,DOM几个例子和PULL解析器
使用XML在Android 工作
I have an XML Document I want to create a method that will parse the XML which is in Document format to String and return 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