hi john,
first of all: thanks for sharing your code. great!
i just tried your XMLObject and it works realy good for me. but i noticed, that the order of the xml-tags gets inverted, when parsing xml<->object.
i think, changing
node = nodes.shift();
to
node = nodes.pop(); 
in line 125 would be better

and i have a question: why does XMLObject extend XML? i dont't understand the reason for that? 

ahoi,
paul



Am 28.02.2006 um 06:02 schrieb John Grden:

http://mirror1.cvsdude.com/trac/osflash/xray/browser/downloads/FLASC/XMLObject.as?rev=104

Sorry, already made a revision ;)

On 2/27/06, John Grden <[EMAIL PROTECTED]> wrote:
Well, thanks to Ben Jackson and everyone else including Alessandro himself, I was able to finally get the XMLObject class working back and forth cleanly.

In creating and import/export for FLASC, it was critical to make sure it was brought back in exactly the way I stored the projects.  After a while, there were a few items to add/fix with the latest version, but I think we're there!

1.  Instead of using split(), i added a counter to go through the array object.  Split was hacking my original array objects ;)

2.  Line 59, instead of doing a for..in loop, I changed it to a regular for loop for index based looping of an array.

3.  Line 131, added boolean casts to make the conversion complete from XML to Object ;)

and of course, with the changes that Ben made for getting rid of "data" properties, it's looking pretty close to being complete.

I now have a complete class that does conversion back and forth between XML and Objects - and so far, it works really well.

You can check it out here:
http://mirror1.cvsdude.com/trac/osflash/xray/browser/downloads/FLASC/XMLObject.as?rev=102#L131

--
John Grden - Blitz



--
John Grden - Blitz
_______________________________________________
osflash mailing list

_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org

Reply via email to