Re: [Flashcoders] xml parsing problem

2006-10-27 Thread Julien V.
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

RE: [Flashcoders] xml parsing problem

2006-10-27 Thread Jack Doyle
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:

RE: [Flashcoders] xml parsing problem

2006-10-27 Thread Steven Sacks | BLITZ
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) {

Re: [Flashcoders] xml parsing problem

2006-10-27 Thread Jim Kremens
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] ==

RE: [Flashcoders] xml parsing problem

2006-10-27 Thread Merrill, Jason
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

Re: [Flashcoders] XML Parsing

2006-06-05 Thread Weldon MacDonald
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

Re: [Flashcoders] XML Parsing

2006-06-05 Thread Sajid Saiyed
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

RE: [Flashcoders] XML Parsing

2006-06-05 Thread Merrill, Jason
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

Re: [Flashcoders] XML Parsing

2006-06-05 Thread Ron Wheeler
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

Re: [Flashcoders] XML Parsing

2006-06-05 Thread Ron Wheeler
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

RE: [Flashcoders] XML Parsing

2006-06-05 Thread Merrill, Jason
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

RE: [Flashcoders] XML Parsing

2006-06-05 Thread Ash Warren
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

RE: [Flashcoders] XML Parsing

2006-06-05 Thread Robert Chyko
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

RE: [Flashcoders] XML Parsing

2006-06-05 Thread Merrill, Jason
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

Re: [Flashcoders] XML Parsing

2006-06-05 Thread Sajid Saiyed
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

Re: [Flashcoders] XML Parsing

2006-06-05 Thread Ron Wheeler
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

RE: [Flashcoders] XML Parsing

2006-06-05 Thread Doug Coning
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

Re: [Flashcoders] XML Parsing

2006-05-25 Thread Mike Britton
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

RE: [Flashcoders] XML Parsing

2006-05-25 Thread Matt Jurgemeyer
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

Re: [Flashcoders] XML Parsing

2006-05-25 Thread Mike Boutin
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

RE: [Flashcoders] XML Parsing

2006-05-25 Thread Matt Jurgemeyer
; } -- -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

Re: [Flashcoders] XML Parsing

2006-05-25 Thread Mike Britton
; } -- -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

RE: [Flashcoders] XML Parsing

2006-05-25 Thread Jason Lutes
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

RE: [Flashcoders] XML Parsing

2006-05-25 Thread Matt Jurgemeyer
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

RE: [Flashcoders] XML Parsing

2006-05-25 Thread Steven Sacks
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) {

RE: [Flashcoders] XML Parsing

2006-05-25 Thread Matt Jurgemeyer
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

RE: [Flashcoders] XML Parsing

2006-05-25 Thread Steven Sacks
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

RE: [Flashcoders] XML Parsing

2006-05-25 Thread Matt Jurgemeyer
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

Re: [Flashcoders] XML Parsing

2006-05-05 Thread Mars Spider - Upgrade Multimediale Srl
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

Re: [Flashcoders] XML Parsing

2006-05-05 Thread Mars Spider - Upgrade Multimediale Srl
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 ___

RE: [Flashcoders] XML Parsing

2006-05-05 Thread Merrill, Jason
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

Re: [Flashcoders] XML Parsing

2006-05-05 Thread GregoryN
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

Re: [Flashcoders] XML Parsing

2006-05-05 Thread PR Durand
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

RE: [Flashcoders] XML Parsing

2006-05-04 Thread Steven Sacks
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

Re: [Flashcoders] XML Parsing

2006-05-04 Thread Danny Kodicek
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

Re: [Flashcoders] XML Parsing

2006-05-04 Thread Mars Spider - Upgrade Multimediale Srl
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:

Re: [Flashcoders] XML Parsing

2006-05-04 Thread Jason Lutes
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

Re: [Flashcoders] XML Parsing

2006-05-04 Thread David Rorex
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

Re: [Flashcoders] XML Parsing

2006-05-04 Thread GregoryN
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

Re: [Flashcoders] Xml parsing object

2005-10-29 Thread Alain Rousseau
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

Re: [Flashcoders] Xml parsing object

2005-10-29 Thread Weyert de Boer
Thanks! I will have a look :-) ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders