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

  • Docs in Cloud Not syncing between OS (10.8.2) and iOS (6)

    I am running all of the most recent software available for both OS and iOS (including the iWork software on each). For about a week not, my docs have not been syncing. I will open something on my iPad/iPhone, take notes for a couple hours in class. T

  • Laserwriter problem: the network host is busy ...

    HI, My Intel iMac is connected to a LaserWriter 16/600 PS.  I have used this printer for many years.  I have always worked even with my Intel iMac.  This morning trying to use it as usual I got a print error message, telling me: "reversible problem:

  • Characters in character set

    My 9i database character set is WE8DEC Is there any documentation or a way where I can see all the characters supported by this character set ? I am more interested in special characters, as what is happening is that when we insert a specific special

  • Max number of records for  'BAPI_PBSRVAPS_GETDETAIL'.

    Hi All, Can you suggest me the number of records to be fed to the 'BAPI_PBSRVAPS_GETDETAIL'. I am using a few location products for 9 key figures.Whenever number of records in selection table increases BAPI behaves in a strange way and the code writt

  • Production order control data tab

    Hi, Is there any chance the costing data under control data tab in production order can make out "grayed" so that users can not change costing sheet, RA key. Thanks in advance.