Re: Native XML in string parameters

Gaetano Giunta <[email protected]> Tue, 02 Jun 2009 16:46:07 +0200
Newsgroups gmane.text.xml.rpc.specification
Message-ID <[email protected]>
kereszt_hu a =E9crit :
>
>
> After digging up the posts I decided to ask..
>
> According to XML-RPC spec, parameter value of <string> cannot contain=20
> < or &. This means, sending XML as a parameter should be escaped. Even=20
> though, it is going to be part of another XML. Am I right?
>
> Is there any way to keep XML in parameters un-encoded.. and so human=20
> readable? eg. <xml> value "type"?
>
> Maybe, I've gone too far. Please, clarify me either how to pass XML as=20
> a parameter value or XML-RPC is not for this use and I must crack down=20
> to simpler parameters or encoded (xml or base64) values.
>
> Thank you
> Laszlo
>


















There is no way, to send unescaped xml, sorry.
It is not the fault of xmlrpc, it is the fault of the xml spec _ you=20
cannot ever use a "<" char inside a block of text in xml - there would=20
be no sensible way for the parser to know that that char is not the=20
start of a new element.
Normally the xmlrpc library you are using takes care of the encoding for=20
you, so that you do not have to take care of it, neither when sending=20
nor when receiving strings.
Otoh if you plan to send binary data, you might be sending something=20
that will not be properly escaped and thus invalid in the charset you=20
are using. Better base64-encode in that case.
If you are writing your own xmlrpc library, please stop and pick one of=20
the many existing ones.


bye
Gaetano


[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]=20
    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/