Re: Native XML in string parameters

John Wilson <[email protected]> Tue, 2 Jun 2009 15:48:05 +0100
Newsgroups gmane.text.xml.rpc.specification
Message-ID <[email protected]>
On 2 Jun 2009, at 15:24, kereszt_hu wrote:

> After digging up the posts I decided to ask..
>
> According to XML-RPC spec, parameter value of <string> cannot  
> contain < or &. This means, sending XML as a parameter should be  
> escaped. Even though, it is going to be part of another XML. Am I  
> right?

Yes, implementations generally use &lt; and &amp;
>
>
> Is there any way to keep XML in parameters un-encoded.. and so human  
> readable? eg. <xml> value "type"?

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.

>
>
> Maybe, I've gone too far. Please, clarify me either how to pass XML  
> as a parameter value or XML-RPC is not for this use and I must crack  
> down to simpler parameters or encoded (xml or base64) values.

What XML-RPC implementation are you using? I would expect the  
implementation to accept and correctly substitute the < and &  
characters in string parameters.


John Wilson




[Non-text portions of this message have been removed]



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/xml-rpc/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/xml-rpc/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[email protected] 
    mailto:[email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/