当前位置: 动力学知识库 > 问答 > 编程问答 >

Converting string to XML in android?

问题描述:

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

分享给朋友:
您可能感兴趣的文章:
随机阅读: