问题描述:

I am trying to convert data from database to XML in android. After that i am planning to post xml data to server using HttpPost?. But i am not sure how to convert string to xml in android.

I am looking for any sample code and methods.

Thanks in advance

网友答案:

Use the DOM from java library.

Refer:

http://developer.android.com/reference/javax/xml/parsers/DocumentBuilder.html#parse(java.lang.String)

http://exampledepot.com/egs/javax.xml.parsers/BasicDom.html

相关阅读:
Top