Re: [Flashcoders] xml parsing problem
Bill, Take a look at kirupa's XML guide here: http://www.kirupa.com/web/xml/XMLwayAround2.htm I also came across the same problem some time ago. I decided not to play with siblings because our xml schema (especially the order of the sibling nodes) couldn't be predictable. So I went to a custom parsing process based on the nodeName of each child node of my sibling nodes. Something like: var subItemObject:Object = {}; var subItemChildNodes:Array = subItemNode.childNodes; for (var i:Number = 0; i subItemChildNodes.length; i++) { var attributeNode:XMLNode = subItemChildNodes[i]; var attrName:String = attributeNode.nodeName; var attrValue:String = attributeNode.firstChild.nodeValue; subItemObject[attrName] = attrValue; } Hope it helps, Julien Vignali Bill Pelon a écrit : I'm having trouble grabbing the right value from a node any help would be awesome.. I can't figure out where to increment as I'm going through my loop for the sub items. node structure below NetworkLeftnav mainItem name=main item name goes here url=url goes here window=_self open=true subItem textsub item name goes here/text urlsub item URL goes here/url window_self/window /subItem subItem textsub item name goes here # 2/text urlsub item URL # 2/url window_self/window /subItem /mainItem mainItem name=main item 2 url=main item url #2 window=_self open=false /mainItem /NetworkLeftnav AS below onClipEvent(load){ function ExpandData(turbo){ var turboItem = turbo.firstChild.childNodes; var subItem = turbo.firstChild.firstChild.childNodes; trace(number of main section nodes + turbo.firstChild.childNodes.length); // main section count for (var i = 0; i turboItem.length; i++){ var turbo = turboItem[i]; // running through main nodes mainNavName = turbo.attributes.name; mainNavUrl = turbo.attributes.url; mainNavWindow = turbo.attributes.window; mainNavOn = turbo.attributes.open; // set to true or false trace(mainNaveName = + mainNavName); trace(mainNaveURL = + mainNavURL); trace(mainNaveWindow = + mainNavWindow); trace(mainNaveOn = + mainNavOn); if( turbo.childNodes.length =1){ trace(this node has subcontent); trace(number of subcontent nodes = + turbo.childNodes.length); turboChild = turbo.firstChild.firstChild; trace( ); trace(total times to loop = + turbo.childNodes.length); for (var n = 0; n turbo.childNodes.length; n++){ trace(Subcounter incremental value = + n); / THESE NEED TO BE INCRIMENTED trace(turboChild.firstChild.nodeValue); // returns sub item name trace(turboChild.nextSibling.firstChild.nodeValue); // returns sub item URL trace(turboChild.nextSibling.nextSibling.firstChild.nodeValue); // returns sub itemWindow } } trace( ); } } var turbo = new XML(); turbo.ignoreWhite = true; turbo.onLoad = function(success){ if (success) ExpandData(this); else trace(Error loading XML file); } turbo.load(netnav.xml); // what my xml is called that is posted above stop(); } ___ 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
RE: [Flashcoders] xml parsing problem
You might want to try using my XMLParser class. It translates the XML into ActionScript-friendly arrays/objects. http://www.greensock.com/ActionScript/XMLParser.zip Jack Doyle -Original Message- Date: Thu, 26 Oct 2006 22:13:50 -0400 From: Bill Pelon [EMAIL PROTECTED] Subject: [Flashcoders] xml parsing problem I'm having trouble grabbing the right value from a node any help would be awesome.. I can't figure out where to increment as I'm going through my loop for the sub items. node structure below NetworkLeftnav mainItem name=main item name goes here url=url goes here window=_self open=true subItem textsub item name goes here/text urlsub item URL goes here/url window_self/window /subItem subItem textsub item name goes here # 2/text urlsub item URL # 2/url window_self/window /subItem /mainItem mainItem name=main item 2 url=main item url #2 window=_self open=false /mainItem /NetworkLeftnav AS below onClipEvent(load){ function ExpandData(turbo){ var turboItem = turbo.firstChild.childNodes; var subItem = turbo.firstChild.firstChild.childNodes; trace(number of main section nodes + turbo.firstChild.childNodes.length); // main section count for (var i = 0; i turboItem.length; i++){ var turbo = turboItem[i]; // running through main nodes mainNavName = turbo.attributes.name; mainNavUrl = turbo.attributes.url; mainNavWindow = turbo.attributes.window; mainNavOn = turbo.attributes.open; // set to true or false trace(mainNaveName = + mainNavName); trace(mainNaveURL = + mainNavURL); trace(mainNaveWindow = + mainNavWindow); trace(mainNaveOn = + mainNavOn); if( turbo.childNodes.length =1){ trace(this node has subcontent); trace(number of subcontent nodes = + turbo.childNodes.length); turboChild = turbo.firstChild.firstChild; trace( ); trace(total times to loop = + turbo.childNodes.length); for (var n = 0; n turbo.childNodes.length; n++){ trace(Subcounter incremental value = + n); / THESE NEED TO BE INCRIMENTED trace(turboChild.firstChild.nodeValue); // returns sub item name trace(turboChild.nextSibling.firstChild.nodeValue); // returns sub item URL trace(turboChild.nextSibling.nextSibling.firstChild.nodeValue); // returns sub itemWindow } } trace( ); } } var turbo = new XML(); turbo.ignoreWhite = true; turbo.onLoad = function(success){ if (success) ExpandData(this); else trace(Error loading XML file); } turbo.load(netnav.xml); // what my xml is called that is posted above stop(); } ___ 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] xml parsing problem
Or you could use XML2AS. // 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] xml parsing problem
Steven, It would be cool if you made a version of that that was mtasc compatible... Jim Kremens On 10/27/06, Steven Sacks | BLITZ [EMAIL PROTECTED] wrote: Or you could use XML2AS. // 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 -- Jim Kremens ___ 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] xml parsing problem
Can you provide some usage instructions (i.e. what the arguments n and r are for)? Jason Merrill Bank of America Learning Organization Effectiveness - Technology Solutions -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Steven Sacks | BLITZ Sent: Friday, October 27, 2006 4:47 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] xml parsing problem Or you could use XML2AS. // 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 ___ 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] xml parsing problem
I'm having trouble grabbing the right value from a node any help would be awesome.. I can't figure out where to increment as I'm going through my loop for the sub items. node structure below NetworkLeftnav mainItem name=main item name goes here url=url goes here window=_self open=true subItem textsub item name goes here/text urlsub item URL goes here/url window_self/window /subItem subItem textsub item name goes here # 2/text urlsub item URL # 2/url window_self/window /subItem /mainItem mainItem name=main item 2 url=main item url #2 window=_self open=false /mainItem /NetworkLeftnav AS below onClipEvent(load){ function ExpandData(turbo){ var turboItem = turbo.firstChild.childNodes; var subItem = turbo.firstChild.firstChild.childNodes; trace(number of main section nodes + turbo.firstChild.childNodes.length); // main section count for (var i = 0; i turboItem.length; i++){ var turbo = turboItem[i]; // running through main nodes mainNavName = turbo.attributes.name; mainNavUrl = turbo.attributes.url; mainNavWindow = turbo.attributes.window; mainNavOn = turbo.attributes.open; // set to true or false trace(mainNaveName = + mainNavName); trace(mainNaveURL = + mainNavURL); trace(mainNaveWindow = + mainNavWindow); trace(mainNaveOn = + mainNavOn); if( turbo.childNodes.length =1){ trace(this node has subcontent); trace(number of subcontent nodes = + turbo.childNodes.length); turboChild = turbo.firstChild.firstChild; trace( ); trace(total times to loop = + turbo.childNodes.length); for (var n = 0; n turbo.childNodes.length; n++){ trace(Subcounter incremental value = + n); / THESE NEED TO BE INCRIMENTED trace(turboChild.firstChild.nodeValue); // returns sub item name trace(turboChild.nextSibling.firstChild.nodeValue); // returns sub item URL trace(turboChild.nextSibling.nextSibling.firstChild.nodeValue); // returns sub itemWindow } } trace( ); } } var turbo = new XML(); turbo.ignoreWhite = true; turbo.onLoad = function(success){ if (success) ExpandData(this); else trace(Error loading XML file); } turbo.load(netnav.xml); // what my xml is called that is posted above stop(); } ___ 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] XML Parsing
If your data is that consistent and all you need is to transfer it to arrays, then why do you need xpath, you could write your own parser, using while loops, to do this in very little time. I'm not an experrt, but it seems to me that xpath is more useful for dynamic access to the xml. Is that not correct? If I am correct, an interesting question is; what is more efficient, transferring to arrays and using the arrays, or dynamically accessing the xml directly? On 6/5/06, Sajid Saiyed [EMAIL PROTECTED] wrote: Hi, I have an XML like this: root totalLayers number5/number /totalLayers LayerOne asset namesomename0.bmp/name width20/width height10/height xPos50/xPos yPos30/yPos /asset asset namesomename1.bmp/name width20/width height10/height xPos50/xPos yPos30/yPos /asset /LayerOne Layertwo asset namesomename2.bmp/name width20/width height10/height xPos50/xPos yPos30/yPos /asset /LayerTwo /root I want to use XPATH or something similar to create dynamic arrays/string and store values respectivele like this: String: totalLayers = 5; LayerOne and LayerTwo will be a multidimentional array LayerOne[[asset[name,width,height,xpos,ypos]][asset[name,width,height,xpos,ypos]]...] LayerTwo[[asset[name,width,height,xpos,ypos]][asset[name,width,height,xpos,ypos]]...] etc... Any hint or suggestion...? ___ 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 -- Weldon MacDonald ___ 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] XML Parsing
Hi, My data is not this simple or static. I gave this sample XML just to explain the structure. The XML is going to be dynamic, hence I need to parse it using something like XPATH (I suppose). Regards On 6/5/06, Weldon MacDonald [EMAIL PROTECTED] wrote: If your data is that consistent and all you need is to transfer it to arrays, then why do you need xpath, you could write your own parser, using while loops, to do this in very little time. I'm not an experrt, but it seems to me that xpath is more useful for dynamic access to the xml. Is that not correct? If I am correct, an interesting question is; what is more efficient, transferring to arrays and using the arrays, or dynamically accessing the xml directly? On 6/5/06, Sajid Saiyed [EMAIL PROTECTED] wrote: Hi, I have an XML like this: root totalLayers number5/number /totalLayers LayerOne asset namesomename0.bmp/name width20/width height10/height xPos50/xPos yPos30/yPos /asset asset namesomename1.bmp/name width20/width height10/height xPos50/xPos yPos30/yPos /asset /LayerOne Layertwo asset namesomename2.bmp/name width20/width height10/height xPos50/xPos yPos30/yPos /asset /LayerTwo /root I want to use XPATH or something similar to create dynamic arrays/string and store values respectivele like this: String: totalLayers = 5; LayerOne and LayerTwo will be a multidimentional array LayerOne[[asset[name,width,height,xpos,ypos]][asset[name,width,height,xpos,ypos]]...] LayerTwo[[asset[name,width,height,xpos,ypos]][asset[name,width,height,xpos,ypos]]...] etc... Any hint or suggestion...? ___ 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 -- Weldon MacDonald ___ 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
RE: [Flashcoders] XML Parsing
To use Xpath, if you are using the xfactorstudios classes (I don't know much about the built in Xpath features of Flash), you can access a string like: String(XPath.selectNodes(theXMLobject, thePathToTheNode) Or for a number: parseInt(XPath.selectNodes(theXMLobject, thePathToTheNode)[0]); For the length of a node array: XPath.selectNodes(theXMLobject, thePathToTheNodeArray).length; (NOTE: keep in mind these Xpath classes start numbering at 1, not 0 like in Actionscript) Then, instead of multidimensional arrays like that, I would use something more logically organized and easier to traverse, like an array of Objects: Layers = [{assets:[{name:somename0.bmp, width:20, xPos:50, yPos:10}, {name:somename1.bmp, width:20, xPos:100, yPos:15}, {name:somename2.bmp, width:40, xPos:160, yPos:20}]}, {assets:[{name:somename3.bmp, width:20, xPos:50, yPos:55}, {name:somename4.bmp, width:20, xPos:100, yPos:60} {name:somename5.bmp, width:40, xPos:160, yPos:65}]}]; //etc. Usage examples: //to get the number of layers: totalLayers = Layers.length trace(totalLayers); //To access layer 1's first asset name: trace(Layers[0].assets[1].name) //To access layer 2's third asset yPos: trace(Layers[1].assets[2].yPos); Jason Merrill Bank of America Learning Technology Solutions -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Sajid Saiyed Sent: Monday, June 05, 2006 4:18 AM To: Flashcoders mailing list Subject: [Flashcoders] XML Parsing Hi, I have an XML like this: root totalLayers number5/number /totalLayers LayerOne asset namesomename0.bmp/name width20/width height10/height xPos50/xPos yPos30/yPos /asset asset namesomename1.bmp/name width20/width height10/height xPos50/xPos yPos30/yPos /asset /LayerOne Layertwo asset namesomename2.bmp/name width20/width height10/height xPos50/xPos yPos30/yPos /asset /LayerTwo /root I want to use XPATH or something similar to create dynamic arrays/string and store values respectivele like this: String: totalLayers = 5; LayerOne and LayerTwo will be a multidimentional array LayerOne[[asset[name,width,height,xpos,ypos]][asset[name,width,height, xpos,yp os]]...] LayerTwo[[asset[name,width,height,xpos,ypos]][asset[name,width,height, xpos,yp os]]...] etc... Any hint or suggestion...? ___ 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
Re: [Flashcoders] XML Parsing
If it was up to me, I would redo the XML to be a bit more concise and more standard. layers layer name=LayerOne assets asset width=20 height=10 xPos=50 yPos=30 name=somename0.bmp / asset width=20 height=10 xPos=50 yPos=30 name=somename1.bmp/ /assets /layer layer name=LayerTwo assets asset width=20 height=10 xPos=50 yPos=30 name=somename2.bmp / /assets /layer /layers This will parse better. It is probably easier to create. You can parse this into a Layers Object which is a collection (array) of Layer objects. The Layer Object has a name (LayerOne) and a list of Asset Objects as propertie.s The Asset Object has properties which correspond to the XML attributes(width, height, etc.). The total layers is redundant since it is only the length of the Layers Object array of Layers. function getLayerCount(){return layersList.length;} If you are stuck with your existing XMl, you can still use the same object structure once you have parsed it but will have a more complicated parse since you have these LayerOne, LayerTwo trees which will have to be recognized in your parse. With XPath, this will be a PITA. If you write your own parse, you can probably make some assumptions about the tree structure which will avoid having to write a lot of code to deal with LayerOne, etc. By dynamic, we mean that you just store the whole XML string and parse it each time you want some information. If you can not fix your XML structure, dynamic parsing will likely be too expensive and you should parse the XML once into an object hierarchy and work with the objects. Ron Sajid Saiyed wrote: Hi, I have an XML like this: root totalLayers number5/number /totalLayers LayerOne asset namesomename0.bmp/name width20/width height10/height xPos50/xPos yPos30/yPos /asset asset namesomename1.bmp/name width20/width height10/height xPos50/xPos yPos30/yPos /asset /LayerOne Layertwo asset namesomename2.bmp/name width20/width height10/height xPos50/xPos yPos30/yPos /asset /LayerTwo /root I want to use XPATH or something similar to create dynamic arrays/string and store values respectivele like this: String: totalLayers = 5; LayerOne and LayerTwo will be a multidimentional array LayerOne[[asset[name,width,height,xpos,ypos]][asset[name,width,height,xpos,ypos]]...] LayerTwo[[asset[name,width,height,xpos,ypos]][asset[name,width,height,xpos,ypos]]...] etc... Any hint or suggestion...? ___ 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
Re: [Flashcoders] XML Parsing
Sajid Saiyed wrote: Hi, My data is not this simple or static. ???not static - your XML changes after you have read it??? I gave this sample XML just to explain the structure. The XML is going to be dynamic, hence I need to parse it using something like XPATH (I suppose). If the XML changes while you are using it, you will have to use it dynamically and then you do not need the arrays and objects - just a set of parsing routines that wander through the tree looking for data. This is a bit more complicated but we do it often; even for static data sometimes. Unless you change your XML structure to be a bit more normal, XPath will be hard to use and you will have to climb up and down the tree yourself. Ron Regards On 6/5/06, Weldon MacDonald [EMAIL PROTECTED] wrote: If your data is that consistent and all you need is to transfer it to arrays, then why do you need xpath, you could write your own parser, using while loops, to do this in very little time. I'm not an experrt, but it seems to me that xpath is more useful for dynamic access to the xml. Is that not correct? If I am correct, an interesting question is; what is more efficient, transferring to arrays and using the arrays, or dynamically accessing the xml directly? On 6/5/06, Sajid Saiyed [EMAIL PROTECTED] wrote: Hi, I have an XML like this: root totalLayers number5/number /totalLayers LayerOne asset namesomename0.bmp/name width20/width height10/height xPos50/xPos yPos30/yPos /asset asset namesomename1.bmp/name width20/width height10/height xPos50/xPos yPos30/yPos /asset /LayerOne Layertwo asset namesomename2.bmp/name width20/width height10/height xPos50/xPos yPos30/yPos /asset /LayerTwo /root I want to use XPATH or something similar to create dynamic arrays/string and store values respectivele like this: String: totalLayers = 5; LayerOne and LayerTwo will be a multidimentional array LayerOne[[asset[name,width,height,xpos,ypos]][asset[name,width,height,xpos,ypos]]...] LayerTwo[[asset[name,width,height,xpos,ypos]][asset[name,width,height,xpos,ypos]]...] etc... Any hint or suggestion...? ___ 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 -- Weldon MacDonald ___ 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@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] XML Parsing
I agree with Ron on the XML, I didn't mention it earlier because I didn't look that closely, but that XML format you created needs a major overhaul. I would go with his recommended format. Jason Merrill Bank of America Learning Technology Solutions ___ 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] XML Parsing
I have heard also (have not tested myself) that parsing attributes is much quicker as well. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ron Wheeler Sent: Monday, June 05, 2006 9:07 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] XML Parsing If it was up to me, I would redo the XML to be a bit more concise and more standard. layers layer name=LayerOne assets asset width=20 height=10 xPos=50 yPos=30 name=somename0.bmp / asset width=20 height=10 xPos=50 yPos=30 name=somename1.bmp/ /assets /layer layer name=LayerTwo assets asset width=20 height=10 xPos=50 yPos=30 name=somename2.bmp / /assets /layer /layers This will parse better. It is probably easier to create. You can parse this into a Layers Object which is a collection (array) of Layer objects. The Layer Object has a name (LayerOne) and a list of Asset Objects as propertie.s The Asset Object has properties which correspond to the XML attributes(width, height, etc.). The total layers is redundant since it is only the length of the Layers Object array of Layers. function getLayerCount(){return layersList.length;} If you are stuck with your existing XMl, you can still use the same object structure once you have parsed it but will have a more complicated parse since you have these LayerOne, LayerTwo trees which will have to be recognized in your parse. With XPath, this will be a PITA. If you write your own parse, you can probably make some assumptions about the tree structure which will avoid having to write a lot of code to deal with LayerOne, etc. By dynamic, we mean that you just store the whole XML string and parse it each time you want some information. If you can not fix your XML structure, dynamic parsing will likely be too expensive and you should parse the XML once into an object hierarchy and work with the objects. Ron Sajid Saiyed wrote: Hi, I have an XML like this: root totalLayers number5/number /totalLayers LayerOne asset namesomename0.bmp/name width20/width height10/height xPos50/xPos yPos30/yPos /asset asset namesomename1.bmp/name width20/width height10/height xPos50/xPos yPos30/yPos /asset /LayerOne Layertwo asset namesomename2.bmp/name width20/width height10/height xPos50/xPos yPos30/yPos /asset /LayerTwo /root I want to use XPATH or something similar to create dynamic arrays/string and store values respectivele like this: String: totalLayers = 5; LayerOne and LayerTwo will be a multidimentional array LayerOne[[asset[name,width,height,xpos,ypos]][asset[name,width,height,xpos,y pos]]...] LayerTwo[[asset[name,width,height,xpos,ypos]][asset[name,width,height,xpos,y pos]]...] etc... Any hint or suggestion...? ___ 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@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] XML Parsing
I believe it used to be, but anymore the difference is negligible. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ash Warren Sent: Monday, June 05, 2006 10:56 AM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] XML Parsing I have heard also (have not tested myself) that parsing attributes is much quicker as well. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ron Wheeler Sent: Monday, June 05, 2006 9:07 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] XML Parsing If it was up to me, I would redo the XML to be a bit more concise and more standard. layers layer name=LayerOne assets asset width=20 height=10 xPos=50 yPos=30 name=somename0.bmp / asset width=20 height=10 xPos=50 yPos=30 name=somename1.bmp/ /assets /layer layer name=LayerTwo assets asset width=20 height=10 xPos=50 yPos=30 name=somename2.bmp / /assets /layer /layers This will parse better. It is probably easier to create. You can parse this into a Layers Object which is a collection (array) of Layer objects. The Layer Object has a name (LayerOne) and a list of Asset Objects as propertie.s The Asset Object has properties which correspond to the XML attributes(width, height, etc.). The total layers is redundant since it is only the length of the Layers Object array of Layers. function getLayerCount(){return layersList.length;} If you are stuck with your existing XMl, you can still use the same object structure once you have parsed it but will have a more complicated parse since you have these LayerOne, LayerTwo trees which will have to be recognized in your parse. With XPath, this will be a PITA. If you write your own parse, you can probably make some assumptions about the tree structure which will avoid having to write a lot of code to deal with LayerOne, etc. By dynamic, we mean that you just store the whole XML string and parse it each time you want some information. If you can not fix your XML structure, dynamic parsing will likely be too expensive and you should parse the XML once into an object hierarchy and work with the objects. Ron Sajid Saiyed wrote: Hi, I have an XML like this: root totalLayers number5/number /totalLayers LayerOne asset namesomename0.bmp/name width20/width height10/height xPos50/xPos yPos30/yPos /asset asset namesomename1.bmp/name width20/width height10/height xPos50/xPos yPos30/yPos /asset /LayerOne Layertwo asset namesomename2.bmp/name width20/width height10/height xPos50/xPos yPos30/yPos /asset /LayerTwo /root I want to use XPATH or something similar to create dynamic arrays/string and store values respectivele like this: String: totalLayers = 5; LayerOne and LayerTwo will be a multidimentional array LayerOne[[asset[name,width,height,xpos,ypos]][asset[name,width,height,xp os,y pos]]...] LayerTwo[[asset[name,width,height,xpos,ypos]][asset[name,width,height,xp os,y pos]]...] etc... Any hint or suggestion...? ___ 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@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
RE: [Flashcoders] XML Parsing
I believe it used to be, but anymore the difference is negligible. In my experience, on small data sets, it makes little difference. However, using attributes over nodes can in some cases decrease the actual size of the XML file or string by a factor of 3 or 4, do this can make a difference on larger data sets, especially the more complex ones. Jason Merrill Bank of America Learning Technology Solutions ___ 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] XML Parsing
Hi Ron, I can modify the XML structure and will not be a problem , I will try your suggested solution. Merill, I am trying to use XPATH feature built in Flash8. I will try your suggestino as well. Hope to get to a solution soom, but the discussion is surely helping me right now. Sajid On 6/5/06, Merrill, Jason [EMAIL PROTECTED] wrote: I believe it used to be, but anymore the difference is negligible. In my experience, on small data sets, it makes little difference. However, using attributes over nodes can in some cases decrease the actual size of the XML file or string by a factor of 3 or 4, do this can make a difference on larger data sets, especially the more complex ones. Jason Merrill Bank of America Learning Technology Solutions ___ 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
Re: [Flashcoders] XML Parsing
If you get a nice clean XML structure, XPath will save you a lot of code. It takes a bit of getting used to but it will make your life easier. Ron Sajid Saiyed wrote: Hi Ron, I can modify the XML structure and will not be a problem , I will try your suggested solution. Merill, I am trying to use XPATH feature built in Flash8. I will try your suggestino as well. Hope to get to a solution soom, but the discussion is surely helping me right now. Sajid On 6/5/06, Merrill, Jason [EMAIL PROTECTED] wrote: I believe it used to be, but anymore the difference is negligible. In my experience, on small data sets, it makes little difference. However, using attributes over nodes can in some cases decrease the actual size of the XML file or string by a factor of 3 or 4, do this can make a difference on larger data sets, especially the more complex ones. Jason Merrill Bank of America Learning Technology Solutions ___ 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@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] XML Parsing
Isn't attributes quicker because flash has to create an object for each node in the XML? On my projects, attributes are much, much faster to parse large file sizes with. Also, XPATH works faster on attributes(IMO)! Also, another tip that you may have already figured out, if you can control the names of the attributes, then have Flash just loop through the attributes like the code below to parse out all the values. This is very fast to code and to parse, but another benefit is if you add additional attributes, you don't have to remap those. They will be brought in automatically! var parsedData:Array = new Array(); for(i = 0; i myXML_array.length; i++){ var newObj:Object = new Object(); for (var attr in myXML_array[i].attributes){ newObj[attr] = myXML_array[i].attributes; } parsedData.push(newObj); } Doug Coning Senior Web Development Programmer FORUM Solutions, LLC -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Robert Chyko Sent: Monday, June 05, 2006 10:57 AM To: Flashcoders mailing list Subject: RE: [Flashcoders] XML Parsing I believe it used to be, but anymore the difference is negligible. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ash Warren Sent: Monday, June 05, 2006 10:56 AM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] XML Parsing I have heard also (have not tested myself) that parsing attributes is much quicker as well. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ron Wheeler Sent: Monday, June 05, 2006 9:07 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] XML Parsing If it was up to me, I would redo the XML to be a bit more concise and more standard. layers layer name=LayerOne assets asset width=20 height=10 xPos=50 yPos=30 name=somename0.bmp / asset width=20 height=10 xPos=50 yPos=30 name=somename1.bmp/ /assets /layer layer name=LayerTwo assets asset width=20 height=10 xPos=50 yPos=30 name=somename2.bmp / /assets /layer /layers This will parse better. It is probably easier to create. You can parse this into a Layers Object which is a collection (array) of Layer objects. The Layer Object has a name (LayerOne) and a list of Asset Objects as propertie.s The Asset Object has properties which correspond to the XML attributes(width, height, etc.). The total layers is redundant since it is only the length of the Layers Object array of Layers. function getLayerCount(){return layersList.length;} If you are stuck with your existing XMl, you can still use the same object structure once you have parsed it but will have a more complicated parse since you have these LayerOne, LayerTwo trees which will have to be recognized in your parse. With XPath, this will be a PITA. If you write your own parse, you can probably make some assumptions about the tree structure which will avoid having to write a lot of code to deal with LayerOne, etc. By dynamic, we mean that you just store the whole XML string and parse it each time you want some information. If you can not fix your XML structure, dynamic parsing will likely be too expensive and you should parse the XML once into an object hierarchy and work with the objects. Ron Sajid Saiyed wrote: Hi, I have an XML like this: root totalLayers number5/number /totalLayers LayerOne asset namesomename0.bmp/name width20/width height10/height xPos50/xPos yPos30/yPos /asset asset namesomename1.bmp/name width20/width height10/height xPos50/xPos yPos30/yPos /asset /LayerOne Layertwo asset namesomename2.bmp/name width20/width height10/height xPos50/xPos yPos30/yPos /asset /LayerTwo /root I want to use XPATH or something similar to create dynamic arrays/string and store values respectivele like this: String: totalLayers = 5; LayerOne and LayerTwo will be a multidimentional array LayerOne[[asset[name,width,height,xpos,ypos]][asset[name,width,height,xp os,y pos]]...] LayerTwo[[asset[name,width,height,xpos,ypos]][asset[name,width,height,xp os,y pos]]...] etc... Any hint or suggestion...? ___ 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
[Flashcoders] XML Parsing
I'm building my menus dynamically from xml docs, but I'm having a problem with a lag while the xml parses. I have a graphic indicating that the xml is loading, but it isn't showing up for me on broadband. I'm assuming that this is because the xml file is so small, it loads instantly. I still have the lag though, so it must be coming from the parsing time. Is there any way I can indicate or show progress of parsing? I'm sure this has been a common topic in the past, but I haven't been able to find anything online. For reference, the URL is: http://www.jurgmeyer.com http://www.jurgmeyer.com/ - after the page loads, click on any of the four options to see what I'm talking about. ___ 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] XML Parsing
How many nodes are in the XML file? Can you post the code that does the parsing? Mike ___ 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] XML Parsing
Oops ... misspelled my link: http://www.jurgemeyer.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matt Jurgemeyer Sent: Thursday, May 25, 2006 9:53 AM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] XML Parsing I'm building my menus dynamically from xml docs, but I'm having a problem with a lag while the xml parses. I have a graphic indicating that the xml is loading, but it isn't showing up for me on broadband. I'm assuming that this is because the xml file is so small, it loads instantly. I still have the lag though, so it must be coming from the parsing time. Is there any way I can indicate or show progress of parsing? I'm sure this has been a common topic in the past, but I haven't been able to find anything online. For reference, the URL is: http://www.jurgmeyer.com http://www.jurgmeyer.com/ - after the page loads, click on any of the four options to see what I'm talking about. ___ 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
Re: [Flashcoders] XML Parsing
Yes im having the same problem, but with Flash Remoting. Matt Jurgemeyer wrote: I'm building my menus dynamically from xml docs, but I'm having a problem with a lag while the xml parses. I have a graphic indicating that the xml is loading, but it isn't showing up for me on broadband. I'm assuming that this is because the xml file is so small, it loads instantly. I still have the lag though, so it must be coming from the parsing time. Is there any way I can indicate or show progress of parsing? I'm sure this has been a common topic in the past, but I haven't been able to find anything online. For reference, the URL is: http://www.jurgmeyer.com http://www.jurgmeyer.com/ - after the page loads, click on any of the four options to see what I'm talking about. ___ 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
RE: [Flashcoders] XML Parsing
() { while (countermenu_interactive_xml.firstChild.childNodes.length) { attachMovie(global_button, btn+counter, counter+1); //place the buttons set(btn+counter+._x, counter*97-97); row = 1; if(counter3){ row = 2; set(btn+counter+._y, btn1._y + 82); set(btn+counter+._x, counter*97-485); } if(counter7){ row = 3; set(btn+counter+._y, btn1._y + 164); set(btn+counter+._x, counter*97-873); } if(counter11){ row = 4; set(btn+counter+._y, btn1._y + 246); set(btn+counter+._x, counter*97-1261); } if(counter15){ row = 5; set(btn+counter+._y, btn1._y + 328); set(btn+counter+._x, counter*97-1649); } set(btn+counter+.row, row); set(btn+counter+.column, counter+1-((row-1)*4)); btn1._x = 0; // set the button's text set(btn+counter+.the_title, menu_interactive_xml.firstChild.childNodes[counter].attributes.title); set(btn+counter+.the_client, menu_interactive_xml.firstChild.childNodes[counter].attributes.client); //set(btn+counter+.image0, menu_interactive_xml.firstChild.childNodes[counter].firstChild.childNodes); //trace(btn1.image); imgcounter = 0; set(btn+counter+.totalImages, menu_interactive_xml.firstChild.childNodes[counter].firstChild.childNodes.le ngth); totalImages = menu_interactive_xml.firstChild.childNodes[counter].firstChild.childNodes.le ngth; //trace(totalImages); //trace(imgcounter); while (imgcounter=totalImages) { set(btn+counter+.image+imgcounter, menu_interactive_xml.firstChild.childNodes[counter].firstChild.childNodes[im gcounter].childNodes); imgcounter++; } //set(btn+counter+.btnNum, counter); // load the button image var mcLoader:MovieClipLoader = new MovieClipLoader(); mcLoader.loadClip(images/interactive/thumbs/+menu_interactive_xml.firstChi ld.childNodes[counter].attributes.buttonIMAGE, this[btn+counter].imageLoader.btnImage); counter++; } _parent._visible = true; info_clip._visible = false; } -- -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Britton Sent: Thursday, May 25, 2006 10:18 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] XML Parsing How many nodes are in the XML file? Can you post the code that does the parsing? Mike ___ 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
Re: [Flashcoders] XML Parsing
) { // create main menu after successful loading of XML if (ok) { this._parent._parent.loading._alpha = 0; create_menu(); } else { trace(menu_interactive_xml.getBytesLoaded()); } }; // counter = 0; function create_menu() { while (countermenu_interactive_xml.firstChild.childNodes.length) { attachMovie(global_button, btn+counter, counter+1); //place the buttons set(btn+counter+._x, counter*97-97); row = 1; if(counter3){ row = 2; set(btn+counter+._y, btn1._y + 82); set(btn+counter+._x, counter*97-485); } if(counter7){ row = 3; set(btn+counter+._y, btn1._y + 164); set(btn+counter+._x, counter*97-873); } if(counter11){ row = 4; set(btn+counter+._y, btn1._y + 246); set(btn+counter+._x, counter*97-1261); } if(counter15){ row = 5; set(btn+counter+._y, btn1._y + 328); set(btn+counter+._x, counter*97-1649); } set(btn+counter+.row, row); set(btn+counter+.column, counter+1-((row-1)*4)); btn1._x = 0; // set the button's text set(btn+counter+.the_title, menu_interactive_xml.firstChild.childNodes[counter].attributes.title); set(btn+counter+.the_client, menu_interactive_xml.firstChild.childNodes[counter].attributes.client); //set(btn+counter+.image0, menu_interactive_xml.firstChild.childNodes[counter].firstChild.childNodes); //trace(btn1.image); imgcounter = 0; set(btn+counter+.totalImages, menu_interactive_xml.firstChild.childNodes[counter].firstChild.childNodes.le ngth); totalImages = menu_interactive_xml.firstChild.childNodes[counter].firstChild.childNodes.le ngth; //trace(totalImages); //trace(imgcounter); while (imgcounter=totalImages) { set(btn+counter+.image+imgcounter, menu_interactive_xml.firstChild.childNodes[counter].firstChild.childNodes[im gcounter].childNodes); imgcounter++; } //set(btn+counter+.btnNum, counter); // load the button image var mcLoader:MovieClipLoader = new MovieClipLoader(); mcLoader.loadClip (images/interactive/thumbs/+menu_interactive_xml.firstChi ld.childNodes[counter].attributes.buttonIMAGE, this[btn+counter].imageLoader.btnImage); counter++; } _parent._visible = true; info_clip._visible = false; } -- -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Britton Sent: Thursday, May 25, 2006 10:18 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] XML Parsing How many nodes are in the XML file? Can you post the code that does the parsing? Mike ___ 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 -- Mike -- http://www.mikebritton.com http://www.mikenkim.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
RE: [Flashcoders] XML Parsing
Matt, On a reasonably fast computer, a file of 4600+ XML nodes can be slurped in under one second, required download time aside. Your XML requirements are not that steep, so it seems to me that your issue is likely something else not completely obvious in your code sample. Suggestions: 1. If you're placing incoming XML text content into HTML-rendered text fields (primarily using CSS formatting) this can account for a delay. Flash handles tasks related to HTML text very inefficiently (compared to a browser, for example). This can create a significant delay. I've seen this in things I've created that display instantly until I apply text formatting, then it takes a couple of seconds to load. 2. If you're using a pre-loading mechanism, you need to be sure to import class code and Library assets that are exporting for ActionScript on a frame subsequent to the one used to display pre-loader graphics and/or load in your XML data. Loading a bunch of class code and object data, which likely have little or nothing to do with your XML, on the first frame -- the default, can create a significant delay. - pixelTwiddler, a.k.a. Jason ___ 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] XML Parsing
Is this something that would be affected by viewing it online vs. locally? I ask, because locally everything happens without any lag whatsoever. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Britton Sent: Thursday, May 25, 2006 11:52 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] XML Parsing At first glance it seems to be doing a lot inside the while statement. That could account for the lag. 15 times through the loop could slow things down, especially if you're instantiating a moviecliploader each time around. Mike On 5/25/06, Matt Jurgemeyer [EMAIL PROTECTED] wrote: Below are examples of my xml and the code I use to parse it. THIS IS ONE OF MY XML FILES: ?xml version=1.0 encoding=iso-8859-1? INTERACTIVE BUTTON title=website client=CNE buttonIMAGE=webSite_CNE.jpg IMAGES IMAGEwebsite_CNE(1).jpg/IMAGE IMAGEwebsite_CNE(2).jpg/IMAGE /IMAGES /BUTTON BUTTON title=direct emails client=Dell buttonIMAGE=directEmail_Dell.jpg IMAGES IMAGEemail_Dell(1).jpg/IMAGE IMAGEemail_Dell(2).jpg/IMAGE IMAGEemail_Dell(3).jpg/IMAGE IMAGEemail_Dell(4).jpg/IMAGE /IMAGES /BUTTON BUTTON title=enews client=Dell buttonIMAGE=enews_Dell.jpg IMAGES IMAGEenews_Dell(1).jpg/IMAGE IMAGEenews_Dell(2).jpg/IMAGE /IMAGES /BUTTON BUTTON title=corporate website client=Dell buttonIMAGE=webSite_Dell.jpg IMAGES IMAGEwebsite_Dell(1).jpg/IMAGE IMAGEwebsite_Dell(2).jpg/IMAGE IMAGEwebsite_Dell(3).jpg/IMAGE /IMAGES /BUTTON BUTTON title=band website client=Dickie Lee Erwin buttonIMAGE=webSite_Dickie.jpg IMAGES IMAGEwebsite_Dickie(1).jpg/IMAGE /IMAGES /BUTTON BUTTON title=banner ads client=Hoover's Online buttonIMAGE=banners_Hoovers.jpg IMAGES IMAGEbanners_Hoovers(1).jpg/IMAGE IMAGEbanners_Hoovers(2).jpg/IMAGE /IMAGES /BUTTON BUTTON title=website client=Impath buttonIMAGE=webSite_Impath.jpg IMAGES IMAGEwebsite_Impath(1).jpg/IMAGE /IMAGES /BUTTON BUTTON title=website client=Radiant Research buttonIMAGE=webSite_Radiant.jpg IMAGES IMAGEwebsite_Radiant(1).jpg/IMAGE /IMAGES /BUTTON BUTTON title=brand guidelines client=Temple Inland buttonIMAGE=webSite_Inland.jpg IMAGES IMAGEwebsite_Inland(1).jpg/IMAGE IMAGEwebsite_Inland(2).jpg/IMAGE IMAGEwebsite_Inland(3).jpg/IMAGE /IMAGES /BUTTON BUTTON title=snapshot metrics client=Tocquigny buttonIMAGE=Metrics.jpg IMAGES IMAGEwebsite_Metrics(1).jpg/IMAGE IMAGEwebsite_Metrics(2).jpg/IMAGE IMAGEwebsite_Metrics(3).jpg/IMAGE /IMAGES /BUTTON BUTTON title=website client=Tocquigny buttonIMAGE=webSite_Tocquigny.jpg IMAGES IMAGEwebsite_Tocquigny(1).jpg/IMAGE IMAGEwebsite_Tocquigny(2).jpg/IMAGE /IMAGES /BUTTON BUTTON title=direct email client=Toshiba buttonIMAGE=directEmail_Toshiba.jpg IMAGES IMAGEemail_Toshiba(1).jpg/IMAGE /IMAGES /BUTTON BUTTON title=enews client=Vignette buttonIMAGE=enews_Vignette.jpg IMAGES IMAGEenews_Vignette(1).jpg/IMAGE /IMAGES /BUTTON BUTTON title=banner ads client=Winding Road buttonIMAGE=banners_Windingroad.jpg IMAGES IMAGEbanners_Windingroad(1).jpg/IMAGE IMAGEbanners_Windingroad(2).jpg/IMAGE IMAGEbanners_Windingroad(3).jpg/IMAGE
RE: [Flashcoders] XML Parsing
Or you could just use XML2AS function XML2AS(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] XML Parsing
Do you know of a good resource that might explain this to me? It's a bit over my head at this point. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steven Sacks Sent: Thursday, May 25, 2006 2:02 PM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] XML Parsing Or you could just use XML2AS function XML2AS(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 ___ 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] XML Parsing
Search the Flashcoders archives. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matt Jurgemeyer Sent: Thursday, May 25, 2006 1:33 PM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] XML Parsing Do you know of a good resource that might explain this to me? It's a bit over my head at this point. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steven Sacks Sent: Thursday, May 25, 2006 2:02 PM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] XML Parsing Or you could just use XML2AS function XML2AS(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 ___ 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
RE: [Flashcoders] XML Parsing
I believe you're right about the preloader. I did some test, and it seems to be parsing really quickly. I think having all those preloaders initiate at the same time is causing the slow down on non-broadband connections. Thanks! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jason Lutes Sent: Thursday, May 25, 2006 12:44 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] XML Parsing Matt, On a reasonably fast computer, a file of 4600+ XML nodes can be slurped in under one second, required download time aside. Your XML requirements are not that steep, so it seems to me that your issue is likely something else not completely obvious in your code sample. Suggestions: 1. If you're placing incoming XML text content into HTML-rendered text fields (primarily using CSS formatting) this can account for a delay. Flash handles tasks related to HTML text very inefficiently (compared to a browser, for example). This can create a significant delay. I've seen this in things I've created that display instantly until I apply text formatting, then it takes a couple of seconds to load. 2. If you're using a pre-loading mechanism, you need to be sure to import class code and Library assets that are exporting for ActionScript on a frame subsequent to the one used to display pre-loader graphics and/or load in your XML data. Loading a bunch of class code and object data, which likely have little or nothing to do with your XML, on the first frame -- the default, can create a significant delay. - pixelTwiddler, a.k.a. Jason ___ 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
Re: [Flashcoders] XML Parsing
David Rorex wrote: On 5/4/06, Mars Spider - Upgrade Multimediale Srl [EMAIL PROTECTED] wrote: Jason Lutes wrote: I'm experiencing some recursion limit problem with a large XML... How are you currently reading in the XML -- what kind of code structures, etc? What specifically is the recursion limit problem you're having? Are you getting an error message of some kind? Do you think it's a question of the nesting depth for nodes in your XML document, or could it be the sheer quantity of nodes causing the problem? Reason for the questions: I could go into a lengthy explanation about what I've done in the way of XML parsing, but I think it best to first find out if my suggestions can actually apply. i'm using a recursive function to parse the XML and i'm getting an error about 256 limit of recursion parsin a 1600 nodes XML with some childNodes... The problem is function recursion for sure... Splitting XML in two and than 'concat' the resulting parsed Array works fine, but that's not the solution... Are you saying the xml is 1600 levels deep?? that's a bit odd to me. Otherwise, it might be your code which is the problem. Try using a for loop instead of recursion for example. -David R ___ 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 Maybe i write wrong... i'm not working with a 1600 depth XML is a 1600 'item' XML with an average depth of 5/6... not costant... Mars Spider www.marsspider.net ___ 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] XML Parsing
GregoryN wrote: Mars, The only (well) known solution is about editing SWF bytecode to change 256 limit of recursion. Broadly used, btw. Any link or suggestion about this solution? Mars Spider http://www.marsspider.net ___ 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] XML Parsing
Dunno, try out Xpath instead? Is the recursion happening in the XML load in Flash or in the parser code you are using after the XML file is loaded? If it's in the parser code, try Xpath instead to see if that helps, as XPath doesn't work the same way- as I understand it, you access node values on the fly instead of looping through to create new objects like other parsers do. Jason Merrill | E-Learning Solutions | ICF International -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Mars Spider - Upgrade Multimediale Srl Sent: Friday, May 05, 2006 3:02 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] XML Parsing GregoryN wrote: Mars, The only (well) known solution is about editing SWF bytecode to change 256 limit of recursion. Broadly used, btw. Any link or suggestion about this solution? Mars Spider http://www.marsspider.net ___ 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
Re: [Flashcoders] XML Parsing
Mars, Look at Flasm (http://www.nowrap.de/flasm.html) In this long file, see scriptLimits tag sub-section. Good luck. -- Best regards, GregoryN http://GOusable.com Flash components development. Usability services. -- Mars Spider wrote: Mars, The only (well) known solution is about editing SWF bytecode to change 256 limit of recursion. Broadly used, btw. Any link or suggestion about this solution? Mars Spider http://www.marsspider.net ___ 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] XML Parsing
Hi Mars, last time I had such a big xml to parse and got an error while the loop blocked the flash movie, I just changed my 'for' loop with an onEnterFrame based method. this allowed me at same time to display a counter to inform the user about the progression of my parsing process. maybe not the best technical solution, but it was smoother ;) ++ PiR Mars Spider - Upgrade Multimediale Srl a écrit : GregoryN wrote: Mars, The only (well) known solution is about editing SWF bytecode to change 256 limit of recursion. Broadly used, btw. Any link or suggestion about this solution? Mars Spider http://www.marsspider.net ___ 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
RE: [Flashcoders] XML Parsing
Anyone knows something about a ***non* *recursive* XML parser?? Why?? ___ 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] XML Parsing
Anyone knows something about a ***non* *recursive* XML parser?? Why?? Actually, I'd be interested too. I get frustrated with XML because sometimes one uses it for a tree-based structure and sometimes for a linear markup structure, and the two don't naturally go together very well. The XML 'I like drinkcoffee/drink and I love drinktea/drink' is logically a single node with markup, but in a recursive structure the words 'coffee' and 'tea' are both one level down. This is particularly problematic when parsing things like 'one two BIthree/I four/B Ifive/I'. Flash's XML parser actually deals with this pretty well, but I'm yet to find an XML editor which is comfortable with it. Danny ___ 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] XML Parsing
Steven Sacks wrote: Anyone knows something about a ***non* *recursive* XML parser?? Why?? ___ 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 I'm experiencing some recursion limit problem with a large XML... Mars Spider ___ 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] XML Parsing
I'm experiencing some recursion limit problem with a large XML... How are you currently reading in the XML -- what kind of code structures, etc? What specifically is the recursion limit problem you're having? Are you getting an error message of some kind? Do you think it's a question of the nesting depth for nodes in your XML document, or could it be the sheer quantity of nodes causing the problem? Reason for the questions: I could go into a lengthy explanation about what I've done in the way of XML parsing, but I think it best to first find out if my suggestions can actually apply. - pixelTwiddler, a.k.a. Jason ___ 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] XML Parsing
On 5/4/06, Mars Spider - Upgrade Multimediale Srl [EMAIL PROTECTED] wrote: Jason Lutes wrote: I'm experiencing some recursion limit problem with a large XML... How are you currently reading in the XML -- what kind of code structures, etc? What specifically is the recursion limit problem you're having? Are you getting an error message of some kind? Do you think it's a question of the nesting depth for nodes in your XML document, or could it be the sheer quantity of nodes causing the problem? Reason for the questions: I could go into a lengthy explanation about what I've done in the way of XML parsing, but I think it best to first find out if my suggestions can actually apply. i'm using a recursive function to parse the XML and i'm getting an error about 256 limit of recursion parsin a 1600 nodes XML with some childNodes... The problem is function recursion for sure... Splitting XML in two and than 'concat' the resulting parsed Array works fine, but that's not the solution... Are you saying the xml is 1600 levels deep?? that's a bit odd to me. Otherwise, it might be your code which is the problem. Try using a for loop instead of recursion for example. -David R ___ 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] XML Parsing
Mars, The only (well) known solution is about editing SWF bytecode to change 256 limit of recursion. Broadly used, btw. David, I think he means not xml is 1600 levels deep, but rather XML has 1600 nodes and some of them have childNodes :-) -- Best regards, GregoryN http://GOusable.com Flash components development. Usability services. -- Mars Spider wrote: i'm using a recursive function to parse the XML and i'm getting an error about 256 limit of recursion parsin a 1600 nodes XML with some childNodes... The problem is function recursion for sure... Splitting XML in two and than 'concat' the resulting parsed Array works fine, but that's not the solution... -- David Rorex wrote: Are you saying the xml is 1600 levels deep?? that's a bit odd to me. Otherwise, it might be your code which is the problem. Try using a for loop instead of recursion for example. ___ 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] Xml parsing object
Does anyone got some nice object/method that transforms a xml data from a xml object into a nice object graph? I would like to ask (trying to avoid reinventing the wheel) before I am starting writing my own solution for parsing xml data into a structure for easier reference. Yours, Weyert de Boer ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Xml parsing object
Check out Sephiroth's XML2Object class : http://www.sephiroth.it/file_detail.php?id=129 very nice and easy to use. Weyert de Boer wrote: Does anyone got some nice object/method that transforms a xml data from a xml object into a nice object graph? I would like to ask (trying to avoid reinventing the wheel) before I am starting writing my own solution for parsing xml data into a structure for easier reference. Yours, Weyert de Boer ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Xml parsing object
Thanks! I will have a look :-) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders