Archive of UserLand's first discussion group, started October 5, 1998.

Re: How is <value></value> to be interpreted?

Author:Skip Montanaro
Posted:2/13/1999; 6:41:37 AM
Topic:How is <value></value> to be interpreted?
Msg #:2878 (In response to 2875)
Prev/Next:2877 / 2879

<< As I said in a previous response, in this case the server is sending back an empty string. >>

My understanding was that an empty string would be encoded as

not

In going back and re-reading the spec, I noticed the statement: "If no type is indicated, the type is string." I will fix my decoder to match, but I think it's a false economy to not specify the types of all values. In particular, since there are other places in the encoding where redundant information is given, like requiring inside , I see no reason to not be explicit in this case. All it does is complicate XML-RPC decoders.

> What language are you working in?

I'm working in Python but writing an encoder/decoder in C. Fredrik Lundh's works fine, but since it's based on an XML parser written entirely in Python, is too slow for my needs. Fredrik has a faster parser available, but it seemed easier to me to rewrite a special-purpose coder since I already have similar C code available from a couple past efforts at serializing Python data structures.

Skip




This page was archived on 6/13/2001; 4:47:53 PM.

© Copyright 1998-2001 UserLand Software, Inc.