开发者

How to write XML to a URL?

开发者 https://www.devze.com 2023-01-26 19:03 出处:网络
I am tryi开发者_如何学Pythonng to write an XML file to a URL, e.g. http://myIPAddress/myFolder/myFile.xml .

I am tryi开发者_如何学Pythonng to write an XML file to a URL, e.g. http://myIPAddress/myFolder/myFile.xml .

I am using an Apache2 server for my tests on Ubuntu 10.10.

Output line example (ignore apostrophe):

<'myEntity id="1" name="me" />

Also, I want to able to reopen the connection anytime and add lines to the end of the file.

I'd post my attempt here for correction but it's a sad one.

I am trying OutputStreamWriter with URLConnection, please correct me if I should be using a different approach.


You could consider using HttpClient (built into Android) with either HttpPost or HttpPut, depending on what you're trying to do.

0

精彩评论

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