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 tryingOutputStreamWriter
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.
精彩评论