urllib2 and Xml

Glauco glauco at sferacarta.com
Thu Oct 9 06:53:39 EDT 2003


Hi all

I'm building a library than can call a remote sistem in SOAP or in HTML 
for retrieve XML information.
when i use HTML (httppost) with urllib2 i've this problem:

if the response is  something like this
<?xml version="1.0" encoding="utf-8"?><string 
xmlns="http://bdr.izs.it/webservices"><root 
xmlns="http://bdr.izs.it/XMLSchema/ResponseQuery.xsd"
type="doc"><error_info><error><id /><des
/></error><info>162</info><warning 
/></error_info>&
   <FIELD1>
     <FIELD2>14438756</FIELD2>
     <FIELD3>36587707</FIELD3>

obviously  is htmlquoted but this is uncomprensible from expat or minidom.
i can manually htmlunquote but this don't like me.
i've tyed whith urllib.unquote but this don't do nothing
Is possible that urllib2 dont do this  ?

any ideas ?

Glauco
Italy





More information about the Python-list mailing list