when you parse back to xml. pass the first node of the object.. (   xml 
= new XMLObject().parseObject(obj.firstnode, 'firstnode');    )

John Grden wrote:

> yeah, someone mentioned that issue, let me mess with it for a few 
> minutes and get back to you ;)
>
> On 3/2/06, *paul | WE.BYTE!* < [EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>     hi john,
>     forget about the shift/pop thing. everything works well as it is -
>     concerning node-ordering.
>     anyway there seems to be a problem with parsing from object to XML. 
>
>     when you parse xml->object and then back to XML. the first node of
>     the resulting XML appears twice.
>     any ideas?
>
>     ahoi, paul
>
>
>
>     Am 01.03.2006 um 14:49 schrieb John Grden:
>
>>     Good question Paul, I'd have to look through the code to see why
>>     it extends XML.  Sepy is the original writer ;)
>>
>>     As for the shift/pop - i'll take a look - does it work better for
>>     you?  I can see what you're talking about.
>>
>>     On 3/1/06, *paul | WE.BYTE!* <[EMAIL PROTECTED]
>>     <mailto:[EMAIL PROTECTED]>> wrote:
>>
>>         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
>>>         
>>> <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]
>>>         <mailto:[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
>>>         [email protected] <mailto:[email protected]>
>>>         http://osflash.org/mailman/listinfo/osflash_osflash.org
>>>         <http://osflash.org/mailman/listinfo/osflash_osflash.org>
>>
>>
>>
>>         _______________________________________________
>>         osflash mailing list
>>         [email protected] <mailto:[email protected]>
>>         http://osflash.org/mailman/listinfo/osflash_osflash.org
>>
>>
>>
>>
>>
>>     -- 
>>     John Grden - Blitz
>>     _______________________________________________
>>     osflash mailing list
>>     [email protected] <mailto:[email protected]>
>>     http://osflash.org/mailman/listinfo/osflash_osflash.org
>
>
>
>     _______________________________________________
>     osflash mailing list
>     [email protected] <mailto:[email protected]>
>     http://osflash.org/mailman/listinfo/osflash_osflash.org
>
>
>
>
>
> -- 
> John Grden - Blitz
>
>------------------------------------------------------------------------
>
>_______________________________________________
>osflash mailing list
>[email protected]
>http://osflash.org/mailman/listinfo/osflash_osflash.org
>  
>

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

Reply via email to