andre at andregarzia.com
Thu Oct 21 17:39:05 EDT 2010
Hello There Leland,
Be welcome. Are you calling Userland Frontier server with that XML-RPC code?
Well, let my curiosity be put aside and let us get back to business. Our
XML-RPC library is barebones, it works but it is basically some convenient
methods wrapping our XML generation library. Mind you that some time ago,
LiveCode (then known as Revolution) had no multidimensional arrays, so
building structs and more complex objects was not trivial since we could not
match them to some of our data types.
Now LiveCode has multidimensional arrays which are not actually arrays but
hash tables. So we could map back and forth complex structs/arrays with ease
but no one bothered to write those routines. I bet people here have their
own home cooked solution.
I built in dozens of lines a routine to pick an array (LiveCode one) and
build a struct out of it. Works well and is used internally for testing on
the company I work for. I haven't build the reverse routine to pick from
XML-RPC response and decode it back to something addressable.
Mind you that building that routine is not actually difficult, it is just
tedious and error prone but it is simple. These days I am somewhat busy but
as soon as I have free time, I will address this problem. In the mean while,
I suggest that you use a combination of XML-RPC and XML routines to extract
your data. You can make it generic enough so that you can feed it any
XML-RPC response and get an array back, the trick is the iteration routine
to recursively extract arrays and structs from inside arrays and structs.
So making a summary, right now, you don't have fancy routines for making an
XML-RPC a nice object if the response contains complex structures but you
have helper XML and XML-RPC methods that make building such function an
approachable task that can be finished in couple hours.
sorry for not being more helpful right now.
PS: I am somewhat disornganized with my projects, there might be the case
that I've built this function in the past and forgot about it. Will check
More information about the Use-livecode