views:

62

answers:

1

I was looking at XML-RPC for a project. And correct me if I'm wrong, but it seems like XML-RPC has no XML datatype. Are you supposed to pass as a string? or something else?

Am I missing something? Looks like this was though of with SOAP.

+1  A: 

Depending on the language you are using you can work with different data types. This is for JAVA.

Here are all the data types among xml-rpc

One of them is the org.w3c.dom.Node. Which can be your xml.

Although IMHO. You don't need to have a data type of a xml. Take a look at the example on wikipedia

Diego Dias
I'm confused about your last sentence. What if I know a parameter on a call is XML, but I don't have any other guarantees on its structure? I can't break it down into other primitives.
tyndall
If you have a parameter like a XML it should look like this <xml><firstNode><secondNode>ItsValue</secondNode></firstNode>you can use instead of it the datatypes of firstNode and secondNode. Although you are probably right thinking a xml datatype would turn it easier.I dont see any case where you cant substitute it by the other data types (probably with <string> and <value> on most of the cases).Also that's a little biased comment since I dont really like xml-rpc
Diego Dias
I guess you could do <XmlInformation><string><doc>some schemaless doc</doc></string></XmlInformation> not sure if <string> values are supposed to contain XML (and at that XML unescaped)
tyndall