I've got a few examples of how to go about using this sort of
implementation with SimpleXMLDecoder along with recursive
ObjectTranslator calls, tied into HTTPService calls using xmlDecode =]
http://booleanbetrayal.com/2007/05/18/httpservice-xmldecode-objecttranslator-and-rabidsquirrels/
Hope thi
This is some very interesting code. I can see a great value using this code to
convert data returned by a web service into Flex objects.
Three issues come to mind.
1) I don't always construct an object from XML. Sometimes, I construct an
object with data returned from a web service,
Hi there,
Tony Alves tipped me off that there was a thread about this when I posted my
article on instant binding to XML models. Feel free to use the code I
present in my approach here:
http://www.partlyhuman.com/blog/roger/instant-model-binding-with-reflection
Cheers!
Roger Braunstein
Thank you Troy, for your suggestions.
I cannot understand one thing, using SimpleXMLDecoder i got Object
from XML BUT I cannot make this ObjectProxy cast to my Album Object.
What is the condition to cast object fields are same, I cant
understand how does it works :(
--- In flexcoders@yahoogr
> Does anybody have good examples how SimpleXMLDecoder works ?
I've never found a good one. Senocular has a library called
XMLDefinition (google it). I've not looked at it too much, but it
superficially appears to do what you're looking for.
I don't like the idea of passing the XML into the objec
Does anybody have good examples how SimpleXMLDecoder works ?
--- In flexcoders@yahoogroups.com, "lytvynyuk" <[EMAIL PROTECTED]> wrote:
>
> Thank you I kinda knew about that way ;)
> but if my object contains30 fields and also has a bunch of another
> objects, this procedure will be painful ;)
>
Thank you I kinda knew about that way ;)
but if my object contains30 fields and also has a bunch of another
objects, this procedure will be painful ;)
What about this way:
public function result(event:ResultEvent):void {
var xmlS:XML = XML(event.result);
var decoder:SimpleXMLDecoder = new Simple
You can't automatically convert XML to a strong typed object. You
should create a method in your Album class that takes an xml
variable, and then populate the Album from there.
ie
var album:Album = new Album();
album.setData(event.result);
class Album
{
public function setData(data:XML):vo
8 matches
Mail list logo