[Laszlo-dev] flash 9 XMLList object
Henry Minsky
henry.minsky at gmail.com
Thu Jan 24 19:28:23 PST 2008
The Flash 9 runtime defines a class called XMLList, which is like an XML DOM
object, except it doesn't need t a root node, it can be a list of elements.
This is interesting because it is making explicit something that we've been
doing implicitly.
In LZX we allow a dataset that looks like
<dataset>
<foo/>
<bar/>
<baz/>
</dataset>
Which makes a dataset which looks like
«lz.dataset#0| <foo><foo/><bar/><baz/></foo>»
lzx> foo.childNodes
«Array(3)#1| [<foo/>, <bar/>, <baz/>]»
lzx>
Because we implicitly make a root node which is never shown.
Many times it is useful to represent list data as XML, and you don't want to
have to force it to have a single root node.
They apparently decided this was common enough to make a class for it.
However, the XMLList object throws and error if
you try to do any XML operations on it, you need to iterate over it's
members if it has length greater than one.
--
Henry Minsky
Software Architect
hminsky at laszlosystems.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20080124/022a8c60/attachment.html
More information about the Laszlo-dev
mailing list