[Laszlo-dev] flash 9 XMLList object
Henry Minsky
henry.minsky at gmail.com
Thu Jan 24 22:05:43 PST 2008
That seems pretty likely..
On Jan 25, 2008 12:37 AM, Elliot Winard <enw at laszlosystems.com> wrote:
> D'ya think this is a backwards compatibility thing because Flash always
> used to support invalid XML that had no root node?
> -e
>
> Henry Minsky wrote:
> >
> > 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 <mailto:hminsky at laszlosystems.com>
> >
>
--
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/38db064e/attachment.html
More information about the Laszlo-dev
mailing list