How to access multiple attributes of a node at the same time in XML AS3

     <chapter id="1" title="">
     <screen title="lesson">
     <swf>EXCEL/CH01/CH01_S01.swf</swf>
     <ltitle>Chapter 1</ltitle>
     <rtitle>Setting Up a Workbook</rtitle>
     <prompt>Choose a lesson</prompt>
     </screen>
     <screen title="lesson" tasks="3">
     <swf>EXCEL/CH01/CH01_S02.swf</swf>
     <ltitle>Chapter 1</ltitle>
     <rtitle>Setting Up a Workbook</rtitle>
     <prompt>Click Next to continue</prompt>
     </screen>
I have 2 attributes of screen node which are title and tasks.
how can I access these 2 attributes at the same time in AS3
Is that correct:
excel.chapter.screen.(@title == "lesson").@tasks
Thanks alot in advance.

var excel:XML = <data>
<chapter id="1" title=""> 
  <screen title="lesson" tasks="">
   <swf>EXCEL/CH01/CH01_S01.swf</swf>
   <ltitle>Chapter 1</ltitle>
   <rtitle>Setting Up a Workbook</rtitle>
   <prompt>Choose a lesson</prompt>
  </screen>
  <screen title="lesson" tasks="3">
   <swf>EXCEL/CH01/CH01_S02.swf</swf>
   <ltitle>Chapter 1</ltitle>
   <rtitle>Setting Up a Workbook</rtitle>
   <prompt>Click Next to continue</prompt>
  </screen>
</chapter>
</data>;
trace(excel.chapter.screen.(@title == "lesson" && @tasks == "3").toXMLString());
Note that for this to work (and not throw an error) every screen node needs a tasks attribute.
In your sample code, the first screen node did not have a tasks attribute, in which case an error is thrown when using @tasks == "3"

Similar Messages

Maybe you are looking for

  • Can I use two Windows User Accounts simultaneously?

    Hi I use my pc for two businesses. Presently I have two user accounts that I have to switch bewteen by logging off each time - disconnecting my broadband. Is it possible to run the two accounts simultaneously? Regards, Grant Basson [email protected]

  • I keep getting this error message when syncing my iPhone. Why?

    When I seek to sync my iPhone, I get this message: "iTunes cannot sync information with the iPhone "Russell Swaim's iPhone" because syncing has been disabled on this computer. Do you want to enable syncing?" I hit "yes" togive permission to sync, but

  • Primary key allows duplicate entry in data dictionary

    Hi Friends,                  I have created table to save contact details. here i have assigned USERID and CELL_NO as primary key but when i am trying to create new entry it allows duplicate value. How can i prevent this ? Please review my attached i

  • Playback/viewing mxf files

    Hi Ive just been experimenting with creation of DNxHD .mxf files and find that using the VLC player, some display video, other don't (all playback audio)  For example, a clip created with the 365x_1080p_50 settings plays back fine (ie max rate and 10

  • BB app world - unkown error when choosing to download Wunderlist

    Firstly I have the problem regarding the ID server error, which is annoying enough... However, I am still able to download and update apps via USB and App world online. I want to get Wunderlist and when I click to download it, a page comes up and say