| Reply | « Previous Thread | Next Thread » |
|
Hi, I am currently writing a program that sends a HTTP get to a server and along with the HTTP response, the server sends me a XML file. What I am trying to do is to save this file. However i encountered the problem whereby the whole response message is saved. Below is an example of what was saved in the file.
<XML>....<info></info>...</XML>System.Threading.ThreadABortException:Thread was being aborted. at System.Threading. Thread.Abort(object stateinfo) at System Web. HttpResponse.End()at...... The code i used is: Code:
status1, reason1, read1 = post_multipart(host, selector, fields, files)
if status1 > 0:
f = file(path_xml, 'wb')
f.write(read1)
f.close()
appuifw.note(u"Query response received", "info")
read_xml(path_xml)
def read_xml(path_xml):
print path_xml
doc = ET(file=path_xml)
#find the "path" element by tag name
body = doc.getroot().findall("info")[0]
#print body
download_path = body.text
print download_path
download_query(download_path)
I tried google and search but could get no answer. So pls someone help me out ![]()
Last edited by nick_santa83 : 2008-02-12 at 05:25.
|
| nick_santa83 |
| View Public Profile |
| Find all posts by nick_santa83 |
|
Quote:
Mikko Ohtamaa Twinapex Research http://www.twinapex.com |
|
ok. thanks alot
![]() |
| nick_santa83 |
| View Public Profile |
| Find all posts by nick_santa83 |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Strange problem "java.lang.Error 105" | aadipa | Mobile Java General | 6 | 2009-10-22 10:21 |
| Strange problem while installing Carbide.C++ express | jugnoyasir | Carbide.c++ IDE and plug-ins | 4 | 2008-10-06 21:19 |
| strange problem !!! | metebalci | Mobile Java General | 0 | 2005-09-30 09:41 |
| VERY strange memory full problem.. | etamburini | Mobile Java General | 9 | 2005-05-17 16:50 |
| very strange problem | victorh81 | General Symbian C++ | 1 | 2003-12-09 10:09 |