e4x Dash

View: New views
4 Messages — Rating Filter:   Alert me  

e4x Dash

by todd_geist :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello

I would like to use the descendant accessor operator to extract all time-entry nodes from
the event data containing the following XML and loop through them.

<time-invested>
  <group-by>person</group-by>
  <start-date>2008-03-23</start-date>
  <end-date>2008-03-29</end-date>
  <groups>
    <group>
      <title>me</title>
      <total>12.45</total>
      <time-entries>
        <time-entry>
           ---nodes are here ----
        </time-entry>
      </time-entries>
    </group>
  </groups>
</time-invested>

I have tried this...

    for each (var t:XML in event.result..time-entry)

but I get an error  "1120: Access of undefined property entry".

I know this is due to the "-" in the element name but I do not know how to escape it.

any help would be appreciated

Thanks

Todd






Re: e4x Dash

by phipzkillah-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Try ().

event.result..(time-entry)


Sent via BlackBerry from T-Mobile

-----Original Message-----
From: "todd_geist" <tg_lists@...>

Date: Sun, 30 Mar 2008 18:57:33
To:flexcoders@...
Subject: [flexcoders] e4x Dash


Hello
 
 I would like to use the descendant accessor operator to extract all time-entry nodes from
 the event data containing the following XML and loop through them.
 
 <time-invested>
 <group-by>person</group-by>
 <start-date>2008-03-23</start-date>
 <end-date>2008-03-29</end-date>
 <groups>
 <group>
 <title>me</title>
 <total>12.45</total>
 <time-entries>
 <time-entry>
 ---nodes are here ----
 </time-entry>
 </time-entries>
 </group>
 </groups>
 </time-invested>
 
 I have tried this...
 
 for each (var t:XML in event.result..time-entry)
 
 but I get an error "1120: Access of undefined property entry".
 
 I know this is due to the "-" in the element name but I do not know how to escape it.
 
 any help would be appreciated
 
 Thanks
 
 Todd
 
   
------------------------------------

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:flexcoders-digest@...
    mailto:flexcoders-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    flexcoders-unsubscribe@...

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/


RE: e4x Dash

by Gordon Smith-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Try event.result..["time-entry"], and if that doesn't work, try
event.result.descendants("time-entry").

Gordon Smith
Adobe Flex SDK Team


-----Original Message-----
From: flexcoders@... [mailto:flexcoders@...] On
Behalf Of Phil Krasko
Sent: Sunday, March 30, 2008 2:04 PM
To: flexcoders@...
Subject: Re: [flexcoders] e4x Dash

Try ().

event.result..(time-entry)


Sent via BlackBerry from T-Mobile

-----Original Message-----
From: "todd_geist" <tg_lists@...>

Date: Sun, 30 Mar 2008 18:57:33
To:flexcoders@...
Subject: [flexcoders] e4x Dash


Hello

 I would like to use the descendant accessor operator to extract all
time-entry nodes from
 the event data containing the following XML and loop through them.
 
 <time-invested>
 <group-by>person</group-by>
 <start-date>2008-03-23</start-date>
 <end-date>2008-03-29</end-date>
 <groups>
 <group>
 <title>me</title>
 <total>12.45</total>
 <time-entries>
 <time-entry>
 ---nodes are here ----
 </time-entry>
 </time-entries>
 </group>
 </groups>
 </time-invested>
 
 I have tried this...
 
 for each (var t:XML in event.result..time-entry)
 
 but I get an error "1120: Access of undefined property entry".
 
 I know this is due to the "-" in the element name but I do not know how
to escape it.
 
 any help would be appreciated
 
 Thanks
 
 Todd
 
   
------------------------------------

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
Links




Re: e4x Dash

by todd_geist :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

--- In flexcoders@..., "Gordon Smith" <gosmith@...> wrote:
>
> Try event.result..["time-entry"],

this does not work


>and if that doesn't work, try
> event.result.descendants("time-entry").


This DOES work.  THANKS

>
> Gordon Smith
> Adobe Flex SDK Team

Thanks

Todd