It looks like your provided example should work.  However, the expression
will fail if there is an "MetaData" node without any "itemid" node child, so
if your example is not your actual test/use case, then this might be your
problem.  If it is, solve it by using this:

myData.Entry..MetaData.(elements("itemid") == 1234)

- Daniel Freiman

On Thu, Sep 25, 2008 at 10:48 PM, Durres76 <[EMAIL PROTECTED]> wrote:

>   hi,
> i'm getting a strange error, strange to me at least, when i run the
> following expression on the below xml data:
> - expression: myData.Entry..MetaData.(itemid == 1234)
> - var myData =
> <Entries>
> <Entry type="text">
> <MetaData>
> <itemid>1234</itemid>
> </MetaData>
> </Entry>
> <Entry type="text">
> <MetaData>
> <itemid>1234</itemid>
> </MetaData>
> </Entry>
> <Entry type="text">
> <MetaData>
> <itemid>12345</itemid>
> </MetaData>
> </Entry>
> </Entries>
>
> This is the runtime error in Flex:
> ReferenceError: Error #1065: Variable itemid is not defined
>
> i can't understand how itemid is not defined.
>
> Thanks,
> d
>
>  
>

Reply via email to