Search the web
Sign In
New User? Sign Up
xml-rpc · XML-RPC Discussion
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Native XML in string parameters   Message List  
Reply | Forward Message #6819 of 6840 |
Re: [xml-rpc] Re: Native XML in string parameters


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



Thu Jun 4, 2009 6:16 am

tug123uk
Offline Offline
Send Email Send Email

Forward
Message #6819 of 6840 |
Expand Messages Author Sort by Date

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...
kereszt_hu
Offline Send Email
Jun 2, 2009
2:30 pm

... 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 cannot ever use a "<" char inside a...
Gaetano Giunta
gaetanogiunt...
Offline Send Email
Jun 2, 2009
2:47 pm

... Yes, implementations generally use &lt; and &amp; ... Yes, the text can be enclosed in a CDATA section: <![CDATA[ some text with < and & ]]> I'd be...
John Wilson
tug123uk
Offline Send Email
Jun 2, 2009
2:49 pm

... 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...
kereszt_hu
Offline Send Email
Jun 3, 2009
10:19 pm

... 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 ...
John Wilson
tug123uk
Offline Send Email
Jun 4, 2009
6:17 am

... You might want to look up the relax-ng spec for xmlrpc if you want to add more formalism / automation to the protocol. Unfortunately using xsd to exactly...
gaetanogiunta2000
gaetanogiunt...
Offline Send Email
Jun 4, 2009
8:02 am

... The safest approach is to taken encoded XML and base-64 encode it as a binary payload. This way you don't have to know or are about the encoding of the...
Fred Drake
pythondocs
Offline Send Email
Jun 2, 2009
2:51 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help