Re: [flexcoders] Object serialisation + SimpleXMLEncoder
I had try too... No sucess... any knows the way? VELO On 2/4/07, Aly Sidi [EMAIL PROTECTED] wrote: Hey Lachlan, did you ever get this to work?..I am trying to do the same thing... cheers -aly On 8/17/06, Lachlan Cotter [EMAIL PROTECTED] wrote: Hi List, I want to be able to serialise and de-serialise ActionScript objects to XML so they can sent to a server application. I would prefer to write a method for this once that can handle any object. Unfortunately, the introspection API is sadly wanting (doesn't report private members), which makes it insufficient for this purpose. The SimpleXMLEncoder apparently does this, but I can't work out how to use it. Can anybody point me to some examples or offer suggestions for alternative methods? This code produces errors: *var myObj:TestClass = new TestClass;* *var doc:XMLDocument = new XMLDocument;* *var coder:SimpleXMLEncoder = new SimpleXMLEncoder(doc);* *var node:XMLNode = coder.encodeValue(myObj, ( as QName), doc);* *trace(node.toString());* What am I doing wrong? Cheers, Lach
Re: [flexcoders] Object serialisation + SimpleXMLEncoder
That works... var node:XMLNode = coder.encodeValue(bean, new QName(), doc); 2 seconds after hour and the answer shows up. VELO On 5/29/07, Marvin Froeder [EMAIL PROTECTED] wrote: I had try too... No sucess... any knows the way? VELO On 2/4/07, Aly Sidi [EMAIL PROTECTED] wrote: Hey Lachlan, did you ever get this to work?..I am trying to do the same thing... cheers -aly On 8/17/06, Lachlan Cotter [EMAIL PROTECTED] wrote: Hi List, I want to be able to serialise and de-serialise ActionScript objects to XML so they can sent to a server application. I would prefer to write a method for this once that can handle any object. Unfortunately, the introspection API is sadly wanting (doesn't report private members), which makes it insufficient for this purpose. The SimpleXMLEncoderapparently does this, but I can't work out how to use it. Can anybody point me to some examples or offer suggestions for alternative methods? This code produces errors: *var myObj:TestClass = new TestClass;* *var doc:XMLDocument = new XMLDocument;* *var coder: SimpleXMLEncoder = new SimpleXMLEncoder(doc);* *var node:XMLNode = coder.encodeValue(myObj, ( as QName), doc);* *trace(node.toString ());* What am I doing wrong? Cheers, Lach
Re: [flexcoders] Object serialisation + SimpleXMLEncoder
Hey Lachlan, did you ever get this to work?..I am trying to do the same thing... cheers -aly On 8/17/06, Lachlan Cotter [EMAIL PROTECTED] wrote: Hi List, I want to be able to serialise and de-serialise ActionScript objects to XML so they can sent to a server application. I would prefer to write a method for this once that can handle any object. Unfortunately, the introspection API is sadly wanting (doesn't report private members), which makes it insufficient for this purpose. The SimpleXMLEncoder apparently does this, but I can't work out how to use it. Can anybody point me to some examples or offer suggestions for alternative methods? This code produces errors: *var myObj:TestClass = new TestClass;* *var doc:XMLDocument = new XMLDocument;* *var coder:SimpleXMLEncoder = new SimpleXMLEncoder(doc);* *var node:XMLNode = coder.encodeValue(myObj, ( as QName), doc);* *trace(node.toString());* What am I doing wrong? Cheers, Lach
[flexcoders] Object serialisation + SimpleXMLEncoder
Hi List,I want to be able to serialise and de-serialise ActionScript objects to XML so they can sent to a server application. I would prefer to write a method for this once that can handle any object. Unfortunately, the introspection API is sadly wanting (doesn't report private members), which makes it insufficient for this purpose. The SimpleXMLEncoder apparently does this, but I can't work out how to use it. Can anybody point me to some examples or offer suggestions for alternative methods?This code produces errors:var myObj:TestClass = new TestClass;var doc:XMLDocument = new XMLDocument;var coder:SimpleXMLEncoder = new SimpleXMLEncoder(doc);var node:XMLNode = coder.encodeValue(myObj, ("" as QName), doc);trace(node.toString());What am I doing wrong?Cheers,Lach __._,_.___ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Software development tool Software development Software development services Home design software Software development company YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. __,_._,___