Chris Curvey wrote:
> I'm writing an XMLRPC server, which is receiving a request (from a
> non-Python client) that looks like this (formatted for legibility):
> 
> <?xml version="1.0"?>
> <methodCall>
> <methodName>echo</methodName>
> <params>
> <param>
> <value>
> <string>Le Martyre de Saint Andr&#xe9; &lt;BR&gt; avec inscription
> &apos;Le Dominiquain.&apos; et &apos;Le tableau fait par le dominicain,
> d&apos;apr&#xe8;s son dessein &#xe0;... est &#xe0; Rome, &#xe0;
> l&apos;&#xe9;glise Saint Andr&#xe9; della Valle&apos; sur le
> cadre&lt;BR&gt; craie noire, plume et encre brune, lavis brun
> rehauss&#xe9; de blanc sur papier brun&lt;BR&gt; 190 x 228 mm. (7 1/2 x
> 9 in.)</string>
> </value>
> </param>
> </params>
> </methodCall>
> 
> But when my "echo" method is invoked, the value of the string is:
> 
> Le Martyre de Saint Andr; <BR> avec inscription 'Le Dominiquain.' et
> 'Le tableau fait par le dominicain, d'apr:s son dessein 2... est 2
> Rome, 2 l';glise Saint Andr; della Valle' sur le cadre<BR> craie noire,
> plume et encre brune, lavis brun rehauss; de blanc sur papier brun<BR>
> 190 x 228 mm. (7 1/2 x 9 in.)
> 
> Can anyone give me a lead on how to convert the entity references into
> something that will make it through to my method call?

Are you rolling your own XML parser? (Why?) An off-the-shelf parser should take 
care of this for 
you. Do you know about xmlrpclib and SimpleXMLRPCServer?

Kent
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to