On 3 Jun 2009, at 10:36, kereszt_hu wrote:
> --- In
xml-rpc@yahoogroups.com, John Wilson <tug@...> wrote:
>> Yes, the text can be enclosed in a CDATA section:
>>
>> <![CDATA[ some text with < and & ]]>
>>
>> I'd be slightly nervous about using CDATA sections as some
>> implementations of XML-RPC have used very simple code to parse the
>> XML
>> and may not be able to understand the construct.
>
> Actually, CDATA were my next tip. Your post explained to me that XML-
> RPC uses just the <string>'s node value and not everything below it.
> In the later case, one would put both string (of course escaped) and/
> or sub-tree nodes.
I'm not sure I understand what you are saying. Let me try to clarify
what the spec says:
A <string> can only contain text (in XML terms CDATA). It may not
contain markup (i.e. unescaped XML is not allowed). CDATA sections are
allowed because they are not markup but just an alternative way of
escaping & and <.
>
>
>> What XML-RPC implementation are you using? I would expect the
>> implementation to accept and correctly substitute the < and &
>> characters in string parameters.
>
> I've just begun to play with XML-RPC, to evolve our HTTP/POST
> methods to so-called "web service" ;) Since, it worked well posting
> simple XMLs I try to avoid the more complicated SOAP thing. However,
> WSDL also required..
I would strongly advise you not to try implementing your own XML-RPC
service. Whist it's a simple protocol, there are some subtleties in
implementing it. There are XML-RPC implementations in all the common
programming languages. I'd advise you to look for n existing
implementation in the language you use.
John Wilson