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

  • Can anybody explain how to print multiple copies of different documents at the same time as at the moment I have to open each individually and press print

    Can anybody explain how to print multiple copies of different documents at the same time as at the moment I have to open each individually and press print

    is this a windows in bootcamp question ?

  • How to lock multiple user for a transcation code at same time is der any tc

    how to lock multiple user for a transcation code at same time is der any tc
    suppose i hav 15 user and i want to lock 10 user for mm02 who can i to it

    Basis can do a export and import transport, still if don't have connection between boxes.
    or
    check this
    http://www.sap-basis-abap.com/abap/copy-program-variants-from-one-to-another.htm

  • How do you stop multiple Youtube videos from playing at the same time?

    As of a few days ago, when I click on a youtube video, as the commercial begins to play, you can begin to hear multiple/different commercials playing at the same time. After the commercials, the same issue occurs with the main video--multiple videos are being played at the same time and are not in sync. I've updated all my plug ins and have tried the suggestion posted in the forum provided in the link below in which someone else has expressed the same issue, but nothing has worked so far. Does anyone know what can be done?
    http://productforums.google.com/forum/#!topic/youtube/5Lnikma4UqM

    Are you loading those videos as Flash or HTML5? It is possible to prevent videos from playing until you click something with Flashblock for Flash or Stop Tube HTML5 for HTML5. You can also stop the commercials with Adblock Plus with an Easylist subscription.
    * https://addons.mozilla.org/en-US/firefox/addon/adblock-plus/
    * https://addons.mozilla.org/en-US/firefox/addon/flashblock/
    * https://addons.mozilla.org/en-US/firefox/addon/stop-tube/

  • How do you keep two users logged in at the same time?

    How do I keep two users logged in at the same time to be able to access home sharing?

    Fast User Switching in Users & Groups or Accounts preferences in Login Options.

  • I am doing two people's jobs and I need to use two separate log-ins on the same website. How can I keep both log-ins open at the same time. Everytime I switch tabs I have to log in again.

    I am doing two people's jobs and I need to use two separate log-ins on the same website. How can I keep both log-ins open at the same time. Everytime I switch tabs I have to log in again.

    Try one of these extensions for multiple cookie sessions.
    Multifox: <br />
    http://br.mozdev.org/multifox/ <br />
    Cookie Swap extension: <br />
    https://addons.mozilla.org/firefox/3255/ <br />
    Cookie Pie extension: <br />
    http://www.nektra.com/oss/firefox/extensions/cookiepie/

  • Can I apply a Rights Management policy to multiple documents in a folder at the same time using Adobe Acrobat Pro?

    How can I apply a single Rights Management Policy to multiple documents in a folder at the same time instead of applying it to each document individually?

    I don't know of a method with Acrobat, why not set up a watch folder and just drop all the files in that folder to have rights applied.  You might want to look at the workbench help if you've not done this before.

  • How to open 2 separate Yahoo email accounts at the same time? I can do this in IE by clicking File | New Session. I dont see how to do this in Firefox.

    How to open 2 separate Yahoo email accounts at the same time, without using an add-on or plug-in? I can do this in IE by clicking File | New Session. I dont see how to do this in Firefox.

    You need two independent set of cookies to achieve this and only an extension can do this.
    * Multifox: http://br.mozdev.org/multifox/
    You can get a second set temporarily by switching to Private Browsing mode and keep the current session open, but that still allows you to only one access one account at the time and you need to login again after reverting to the first account by stopping PB mode.
    *https://support.mozilla.org/kb/Private+Browsing
    * https://wiki.mozilla.org/Firefox3.1/PrivateBrowsing/SecurityReview#Configuration
    *browser.privatebrowsing.dont_prompt_on_enter
    *browser.privatebrowsing.keep_current_session

  • How do I view more than one image at the same time in CS6?

    How do I view more than one image at the same time in CS6?

    Hi there
    If you go to Window > Arrange you can choose from several view options. Below I have selected Two-Up Horizontal since I have two images, but you can select other options if you have more than one image.

  • How do i open 2 hotmail outlook accounts at the same time? Thanks.

    How do I open 2 hotmail outlook accounts at the same time? Thanks.

    Safari only lets me to sign in to one hotmail account at any one time. If I am signed in to one account and I open a new window (or tab) the existing hotmail account I am signed in to opens again (I want to sign into second account simultaneously). So I am trying to sign in to 2 hotmail accounts at the same time. Does that makes sense?

  • How do I get 2 layers to move at the same time?

    How do you get 2 layers to move at the same time?

    Thanks for the help folks, sorry I've been away.
    I'd love help with the problem of why I only one track seems to accept clips to play. When I drag them to other tracks or create a track by dragging the clips are grayed out and won't play, but if I drag them to the one track where they're blue they play.

  • How do I delete all of my mail at the same time?

    How do I delete all of my mail at the same time? Or is this even possible? Thanks for your help.

    Unfortunately it isn't possible. You have to select one at a time. You might want to add your name to the many that have requested this feature in the past.
    https://www.apple.com/feedback/ipad.html

  • How do I delete a bunch of pictures at the same time?

    How do I delete a bunch of pictures at the same time?

    Select the ones you want to delete, then go to Photos > Move to Trash.
    To permanently delete them, =you have to go to the iPhoto menu, then select Empty Photo Trash.

  • Why can't I rotate multiple points in puppet warp at the same time?

    You can rotate single points in puppet warp, and you can shift+click to select multiple points and move them at the same time but I see no way to rotate multiple points as one group using puppet warp.  This would be a very helpful feature I think should be added.

    Please post Bug Reports and Feature Requests over at
    http://feedback.photoshop.com/photoshop_family/

  • How do i export multiple full resolution movie files at the same time in final cut pro 6?

    I've been using Final Cut Pro since version 3 came out, know the program well, have even had jobs consisting of just operating the program.  I'm currently running version 6 because that's the latest one that works on my computer.  Back in verison 3, there used to be an option under Export to export a "Final Cut Pro" movie, which was really a Quicktime movie but appeared with a FCP icon and defaulted to opening in FCP, but the important thing about it is that it was a full resolution copy of the movie with no compression.  Now, that option seems to have been changed to "export Quicktime movie."  In my opinion that change is kind of stupid since it is so much less specific and is even less of an implication that one is exporting a full resolution file.  But in fact you are.
    One also has the option of using Compressor to export a version of a movie, and therein there are so many different options that if you are not confused by it I think there's something wrong with you.  Moreover, it would appear that there is no equivalent of exporting a full resolution version of a file in Compressor.  Fair enough: a full-resolution file involves no compression so is not appropriate for "Compressor."  BUT, suppose you want to export multiple uncompressed, full-resolution movies at once.  When you use Compressor, you are able to create batch lists and export many things at the same time, for instance, lists that will take many hours to complete so you can go to bed and get the results the next day.  But as far as I can tell there is no way to do this at full resolution without compression.  Instead you have to sit at the computer waiting for each one to finish and after each one, manually go to the next and select "export Quicktime movie."  Even if there is a way to do this I would complain that such an obviously desireable thing is so unaccessable.  In fact, the only reason I've typed out my question at such length is because I'm stuck here waiting for each one of my movies to export.
    Anyway, all my complaints aside, anyone know how to do this?

    what you're missing to export multiple files is the batch export command available in the file menu or by control clicking on the items in the browser.  You can export multiple sequences/clips at full resolution with this.
    This has been available in fcp for a long long time.
    Wow, you are right.  Now that you mention it, I can't believe I never noticed that.  Thanks.
    Only if you have the 'Self-Contained' box checked.  Otherwise you'll end up with a reference movie.
    Correct.  That box is typically checked by default.  There are other default settings you could change that would not result in a full-quality version, but what I meant was hitting that option from the pull-down menu, then changing nothing and hitting ok.

Maybe you are looking for

  • Can't see "albums" when reviewing photos stored on external drive

    Goal: I'd like to be able to rapidly hook up my external hard-drive, find 6 photos previously sorted into an album (as when they were originally sorted by me in my computer's iPhoto) and copy those back onto my computer for my use. Problem: When I go

  • Runtime Analysis SE30

    Hi BW Gurus, i have my query based on a Virtual cube for BCS. I ran the query and its taking 14 minutes to give me the result. From RSRT i got the name of the program which run in the backend to generate the report. I took that program name and put i

  • Math characters in preview

    I've recently noticed that some math characters (most notably the nabla character) don't always show up correctly when I view a PDF file using preview. If I open the same file with Acrobat it shows up correctly. I am running 10.6.2 on my Intel-based

  • Top half of video is missing on imported WMV files. Running  CS3 & Win XP Professional

    Top half of video is missing on imported .WMV  files. I'm running CS3 Adobe Premier Pro with Win XP Professional OS Hi all,    I just installed my Adobe Premier Pro CS3 for the very first time. I then IMPORTED a WMV file into the Project Frame and  t

  • [svn:fx-3.x] 11959: Removing rpc-encoded id attributes from the referent when used as a multiRef  (i.e.

    Revision: 11959 Revision: 11959 Author:   [email protected] Date:     2009-11-18 14:16:08 -0800 (Wed, 18 Nov 2009) Log Message: Removing rpc-encoded id attributes from the referent when used as a multiRef (i.e. referenced via an href attribute). Thes