Arrays: new and old keys, i

Mark Wieder mwieder at ahsoftware.net
Sat Sep 13 00:36:41 EDT 2008


Trevor-

Friday, September 12, 2008, 10:22:26 AM, you wrote:

> To finish with, let's look at another XML example I grabbed from one
> of the w3schools samples.

> <breakfast_menu>
>         <food>
>                 <name>Belgian Waffles</name>
>                 <price>$5.95</price>
>                 <description>two of our famous Belgian Waffles with plenty of real
> maple syrup</description>
>                 <calories>650</calories>
>         </food>
>         ...
> </breakfast_menu>

Sorry, I still don't get it. XML is hierarchical, not chronological.
The XML attributes "name", "price", "description", and "calories" are
in no particular order in the xml document, chronological or
otherwise. If you want to enforce an order on them after the fact
you have to do it yourself in some fashion. If you pull the data out
of your array and make an xml document out of it you'll get the same
contents you put in, irregardless of node order.

-- 
-Mark Wieder
 mwieder at ahsoftware.net




More information about the use-livecode mailing list