开发者

Send XML file to web server in Android

I am planning on converting some longitude and latitude values to XML and then sending the file to a web server to display on a Google Map Interface.

Is it possible to send an XML file to a 开发者_StackOverflowweb server through my own application in Android?

Thanks


Yes. Just make a http post with your xml data. You need a web server script that handles the xml you posted to the server aswell.

A guide http://www.anddev.org/viewtopic.php?p=1969


Android has a public class called HttpPost that would work fine.

Basically you specify the url that the server that you are sending the HTTP request to and the content of the XML goes into the POST area. The web server will receive the request and, assuming a php script is at the URL, the script can grab the contents via its own $_POST global variable and do with the XML what needs to be done.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜