RE: [Flashcoders] xml parse question - Steve Sacks

2007-03-16 Thread Merrill, Jason
Here's XML2AS as an AS2 static class for her pleasure. Steve, I've used a lot of XML parsers, and have never found one I've been fully satisfied with. I've seen you post this a few times before, but I couldn never get yours working right, so I thought I would try again. I like the simplicity

RE: [Flashcoders] xml parse question - Steve Sacks

2007-03-16 Thread Steven Sacks | BLITZ
Hey Jason, You don't say .nodeValue - the nodeValue is just the first item in the Array. Technically, it's a String object. Here is a sample class that parse that entire xml and traces it out. In your timeline just put: import com.Test; var test:Test = new Test(); And you'll see it trace the

RE: [Flashcoders] xml parse question - Steve Sacks

2007-03-16 Thread Merrill, Jason
Leadership Development eTools Multimedia Team -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steven Sacks | BLITZ Sent: Friday, March 16, 2007 1:58 PM To: flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] xml parse question - Steve

Re: [Flashcoders] xml parse question

2007-03-15 Thread Carl Welch
Nevermind. I found this in one of my many flash books: myAttributes = this.firstChild.childNodes[0].childNodes[0].attributes; for(attributes in myAttributes){ trace(attributes+ : +myAttributes[attributes]); } On 3/14/07, Carl Welch [EMAIL PROTECTED] wrote: What if I don't know what the

Re: [Flashcoders] xml parse question

2007-03-15 Thread Carl Welch
What if I don't know what the names are going to be? How can I check how many attributes are in a node? is there anything like XMLNode.attributes.length (I know that's wrong...) so I can loop through and find out their names? -- Carl Welch http://www.carlwelch.com [EMAIL PROTECTED] On 3/14/07,

Re: [Flashcoders] xml parse question

2007-03-15 Thread Geoff Stearns
all the attributes are in the attributes object, so you can just do a for...in loop and grab them all. example: for(a in xObj.attributes) { obj[a] = xObj.attributes[a]; } On Mar 15, 2007, at 12:19 AM, Carl Welch wrote: What if I don't know what the names are going to be? How can

RE: [Flashcoders] xml parse question

2007-03-15 Thread Steven Sacks | BLITZ
Here's XML2AS as an AS2 static class for her pleasure. class com.stevensacks.data.XML2AS { public static function parse(n, r) { var a, d, k; if (r[k=n.nodeName] == null) r = ((a=r[k]=[{}]))[d=0]; else r =

Re: [Flashcoders] xml parse question

2007-03-15 Thread John laPlante
The xml that you've shown consists of all attributes, that is value pairs inside a tag. Each node has a attributes property. Here is a small snippet that demonstrates accessing attributes. private function loadProblems(xFileName:String):Void { var sLessonPath = this.theLessonPath;

RE: [Flashcoders] xml parse question

2007-03-15 Thread Rost, Andrew
and then reverse order, when the for is done. Andrew -Original Message- From: Carl Welch [mailto:[EMAIL PROTECTED] Sent: Thursday, March 15, 2007 3:04 AM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] xml parse question Nevermind. I found this in one of my many flash books

RE: [Flashcoders] xml parse question

2007-03-15 Thread Derek Lords
2007 21:19:23 -0700 From: [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] xml parse question What if I don't know what the names are going to be? How can I check how many attributes are in a node? is there anything like XMLNode.attributes.length (I know

Re: [Flashcoders] xml parse question

2007-03-15 Thread Pedro Taranto
use pixlib == http://osflash.org/projects/pixlib and use the Config, ConfigLoader and ConfigLoaderEvent it convert an xml file to a object here is 2 good tutorials about it http://relivethefuture.com/choronzon/2006/11/14/getting-to-know-pixlib/

RE: [Flashcoders] xml parse question

2007-03-15 Thread Steven Sacks | BLITZ
Or you can save yourself the very slow Array.reverse() and just iterate through the array backwards, too. You might be aware of this, but just an FYI, if you're concerned about attributes being order specific. When you loop through the attributes with a for statement, you'll get the

Re: [Flashcoders] xml parse question

2007-03-15 Thread Muzak
, Muzak - Original Message - From: Steven Sacks | BLITZ [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Thursday, March 15, 2007 11:04 PM Subject: RE: [Flashcoders] xml parse question Or you can save yourself the very slow Array.reverse() and just iterate through the array

Re: [Flashcoders] xml parse question

2007-03-14 Thread Muzak
check the docs for XMLNode.attributes - Original Message - From: Carl Welch [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Thursday, March 15, 2007 2:11 AM Subject: [Flashcoders] xml parse question Hi coders, I just started working on a new

Re: [Flashcoders] xml parse question

2007-03-14 Thread Andrew Wright
XMLNode.attributes.imageID XMLNode.attributes.img XMLNode.attributes.text etc Hi coders, I just started working on a new project that is requiring me to handle an xml format that I haven't had to deal with yet. Here is an example of what it looks like: image imageID=halLogin img=hal.png