"QName" and "SimpleXMLEncoder" are e4x also.

 

Why are you using that old stuff anyway?

 

Tracy Spratt,

Lariat Services, development services available

  _____  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of markgoldin_2000
Sent: Monday, April 20, 2009 5:50 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Stack overflow

 






Well, this crashes too:
public function objectToXML(obj:Object):XMLNode 
{
var qName:QName = new QName("root");
var xmlDocument:XMLDocument = new XMLDocument();
var simpleXMLEncoder:SimpleXMLEncoder = new SimpleXMLEncoder(xmlDocument);
var xmlNode:XMLNode = simpleXMLEncoder.encodeValue(obj, qName, xmlDocument);
return xmlNode;
}

--- In flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com,
"Tracy Spratt" <tr...@...> wrote:
>
> You are mixing up the XML implementation versions.
> 
> 
> 
> XMLDocument and simpleDecoder are legacy AS2 classes, included in AS3 only
> for backwards compatibility.
> 
> 
> 
> You cannot use them with XML() which is an e4x implementation.
> 
> 
> 
> Tracy Spratt,
> 
> Lariat Services, development services available
> 
> _____ 
> 
> From: flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com
[mailto:flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com]
On
> Behalf Of markgoldin_2000
> Sent: Monday, April 20, 2009 4:21 PM
> To: flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com
> Subject: [flexcoders] Stack overflow
> 
> 
> 
> 
> 
> 
> 
> 
> I am getting the following:
> Error: Error #1023: Stack overflow occurred.
> at flash.xml::XMLNode()
> at flash.xml::XMLDocument/createElement()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> 
> In this function after the 4th line:
> public function objectToXML(obj:Object):XML 
> {
> var qName:QName = new QName("root");
> var xmlDocument:XMLDocument = new XMLDocument();
> var simpleXMLEncoder:SimpleXMLEncoder = new SimpleXMLEncoder(xmlDocument);
> var xmlNode:XMLNode = simpleXMLEncoder.encodeValue(obj, qName,
xmlDocument);
> var xml:XML = new XML(xmlDocument.toString());
> return xml;
> }
> 
> Interesting that it works once, but second call to this function generates
> the error.
> 
> Thanks for help.
>



Reply via email to