RE: [Flashcoders] RE: LoadVars to XML object
// XML2AS - DO NOT AUTO FORMAT! _global.XML2AS = function(n, r) { var a, d, k; if (r[k=n.nodeName] == null) r = ((a=r[k]=[{}]))[d=0]; else r = (a=r[k])[d=r[k].push({})-1]; if (n.hasChildNodes()) { if ((k=n.firstChild.nodeType) == 1) { r.attributes = n.attributes; for (var i in k=n.childNodes) XML2AS(k[i], r); } else if (k == 3) { a[d] = new String(n.firstChild.nodeValue); a[d].attributes = n.attributes; } }else r.attributes = n.attributes; } ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] RE: LoadVars to XML object
Thanks Jack! On Oct 17, 2006, at 6:28 PM, Jack Doyle wrote: This may be overkill, but feel free to use the XMLParser class I wrote which handles a bunch of stuff related to getting XML into and out of Flash without all the headaches. For example, you can: - Throw any object at the objectToXML() function and it'll translate it into XML. - Use the load() function to load any XML document, parse it into intuitive ActionScript-friendly objects/arrays, and call a function of your choice when it's finished. - Use the sendAndLoad() function to (you'll never guess...) send an object or XML to a server-side script and get the results, parsing them into ActionScript-friendly objects/arrays and calling a function of your choice when it's finished. Download the class and a simple example at: http://www.greensock.com/ActionScript/XMLParser.zip Hope it's helpful. Jack Doyle -Original Message- Date: Tue, 17 Oct 2006 12:16:51 -0400 From: Chip Moeser <[EMAIL PROTECTED]> Subject: [Flashcoders] LoadVars to XML object Hello All, I am trying to convert the return string of a loadvars to an XML object. Does anyone know a simple way of doing this? Thanks! ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] RE: LoadVars to XML object
This may be overkill, but feel free to use the XMLParser class I wrote which handles a bunch of stuff related to getting XML into and out of Flash without all the headaches. For example, you can: - Throw any object at the objectToXML() function and it'll translate it into XML. - Use the load() function to load any XML document, parse it into intuitive ActionScript-friendly objects/arrays, and call a function of your choice when it's finished. - Use the sendAndLoad() function to (you'll never guess...) send an object or XML to a server-side script and get the results, parsing them into ActionScript-friendly objects/arrays and calling a function of your choice when it's finished. Download the class and a simple example at: http://www.greensock.com/ActionScript/XMLParser.zip Hope it's helpful. Jack Doyle -Original Message- Date: Tue, 17 Oct 2006 12:16:51 -0400 From: Chip Moeser <[EMAIL PROTECTED]> Subject: [Flashcoders] LoadVars to XML object Hello All, I am trying to convert the return string of a loadvars to an XML object. Does anyone know a simple way of doing this? Thanks! ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com