These references helped me with e4x:
http://developer.mozilla.org/presentations/xtech2005/e4x/
http://www.devx.com/webdev/Article/33393/0/page/2
Paul
On Mon, Mar 24, 2008 at 8:56 AM, David Ham <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm working with webservice xml data in XML format, and the e4x is
> giving me a little trouble. Am I right on these points:
>
> * All e4x operations return an XMLList. I've been trying to get them
> to return XML, like:
>
> var theNodeIWant : XML = myDataSet.myElement.(@someAttr == "foo")
>
> but it seems this is wrong; I should just expect an XMLList, and even
> if I know for sure that the result is one element long, I should just
> use the pertinent XML methods on the XMLList, since one-element
> XMLLists just pass these calls to the element.
>
> * To test for emptiness or undefined-ness, do I do this:
>
> var theNodeIWant : XML = myDataSet.myElement.(@someAttr == "foo")
> if ( theNodeIWant.length() == 0 ) {
> // e4x query returns no results
> }
>
> Is length() the only way to do this, or is there a more accurate way
> that would return null or undefined?
>
> I get the sense that e4x is really powerful, but it's kind of
> different and it's been busting my balls lately.
>
> Thanks much,
>
> OK
> DAH
>
>
>
--
It is difficult to free fools from the chains they revere. - Voltaire