Attempting to learn XML all over again...

Okay, I’ve been at this for a good few hours now, but
no matter how much I read the help, it doesn’t seem to want
to work.
I have some xml that I’ve managed to read in and am
able to properly trace:
<fruitBowl>
<fruit name=”apples” colour=”red”
seeds=”yes” />
<fruit name=”pears”
colour=”green” seeds=”yes” />
<fruit name=”grapes”
colour=”purple” seeds=”sometimes” />
<fruit name=”blueberries”
colour=”blue” seeds=”no” />
</fruitBowl>
Now, I want to be able to get the first fruit (and the next
after, etc), and its attributes.
Logically, I think I should be able to do this by going (or
something similar):
xmlListObject.child(0).attribute(“name”)
But actionscript 3 seems to disagree. When I trace the above
(and tracing "xmlList.Object.child(0)" ), I get a blank (which
appears to be because the tag actually has no value).
If I trace xmlListObject itself, I get my whole xml. If I
trace xmlListObject.length(), it does return the right amount of
children. But I can’t seem to isolate any 1 child and get an
attribute from it.
Any ideas?

Ah, I’ve finally gotten it:
<fruitBowl>
<fruit name=”apples” colour=”red”
seeds=”yes” />
<fruit name=”pears” colour=”green”
seeds=”yes” />
<fruit name=”grapes”
colour=”purple” seeds=”sometimes” />
<fruit name=”blueberries”
colour=”blue” seeds=”no” />
</fruitBowl>
From the xmlList that contains all of this, I first need to
access its children (all the fruit nodes).
xmlObject.children() will give me:
<fruit name=”apples” colour=”red”
seeds=”yes” />
<fruit name=”pears” colour=”green”
seeds=”yes” />
<fruit name=”grapes”
colour=”purple” seeds=”sometimes” />
<fruit name=”blueberries”
colour=”blue” seeds=”no” />
Then to get the first element I can go:
xmlObject.children()[0] (like in an array)
<fruit name=”apples” colour=”red”
seeds=”yes” />
Finally to get an attribute ‘colour’:
xmlObject.children()[0].attribute(“colour”);
If there are better/other ways to do this, then feel free to
comment.

Similar Messages

  • How do I get a clean start for catalog to start all over again?

    Running PSE5 on Win XP w/SP3
    I have not been able to get any information about how to recover a catalog from files that have been copied as a backup, so it looks like I'm forced to start all over again.  There are about 17000 images in the C: drive.  The images all seem to be OK.  A few days ago there was a properly operating catalog file (and all the others) there, too.
    Since then, I have tried to learn how to make the former catalog file operative, but no luck.  Since then, I have read that just uninstalling and reinstalling PSE5 will do nothing to give me a clean start - that is, all the old (now problematical) catalog file trouble will still be there.
    To start all over again seems like such a waste of time, since I have copies of all the catalog files as they were properly operating in March, but it seems that something important is missing and none of this stuff is useful in any way.  I'm not the PSE5 user, so I didn't know about the external catalog backup that can be done from within PSE5 - so the possibility to use that technique does not exist.  All I have is a straight copy of everything in the Documents and Settings.. ...Application Data\Adobe folder.  I've tried replacing the whole Adobe folder with the backup files, starting PSE5 and looking at the catalog, but that didn't work either. I just get the same old empty catalog.
    So, the 'start all over' option seems like the only way out.  Anyone who has lost the catalog knows how much work is in the catalog, so any help with either making the old catalog file work through reconstruction somehow, or starting all over again, will be very helpful.  Someday, I'd like to learn how this happened.  Until then I'll be backing up the catalog file from within PSE5 to an external location...  Everytime there's a new entry in the catalog information.  That method seems simple enough that even I could do it.
    Thanks,
    Al
    (K3PXR)

    I tried to open the resident 'My Catalog.psa' file.  PSE5 dutifully did that and the catalog information, such as tags and other information that would normally be present when looking at the Organizer is blank, as if nothing has ever been entered in the catalog.
    The 'My Catalog.psa' file is about 600K (according to windows explorer) and resides in the 'Catalogs' folder.  Also there are:
    My Catalog-2.psa  about 3252K
    My Catalog-2.psa about 5380K
    In the folder: 'Catalog Folders' were the folders:
    My Catalog
    My Catalog-1
    In the folder My Catalog are the files:
      backupCt.dat  1K
      collstatus.dat  1K
      tagstatus.dat  1K
      thumb.5.cache  10K
    In the folder My Catalog-1 is the file:
      tn.4.cache  32394 K
    Above I say 'In the folder, Catalog Folders, were the folders My Catalog and My Catalog-1' because last night when shutting down, I didn't know what was in those folders.  I was too tired to check.
    I did copy everything that was in the Adobe folder and all associated sub folders, including the folders above, to an SD flash card before I started to do anything else.  Becasue of this, I should be able to get back to the way it was before I started to do anything, then I opened the catalog file My Catalog-1.psa.  It said that it was made from an earlier version, asked to convert it and contained the 2002 to 2004 catalog information.  To the best of my knowledge, those photos were never entered in PSE5, and probably were from an earlier version of PS Album. 
    So, where is the information that was once in the PSE5 catalog?  Which files should contain that information?  Why can't the files simply be copied from the backup copies back on to the C:\ drive in the proper folders and then upon starting PSE5 see at least the catalog that was present when the copies of the files in the folders above were made?  What dumb mistakes could have been made to overwrite the information in the catalog and make the catalog appear empty?  If I don't learn this, I'll not be able to prevent it from happening again.
    I'm not on the machine with the trouble at the moment, and since it is not my machine, I sometimes have trouble getting to it during normal waking hours.  I don't know the exact clicks and keystrokes that got the catalog from its normal function to appearing and functioning as if it is empty..
    What exactly are the symptoms of "PSE5 doesn't like..."?  The catalog appears and functions as if it is empty - as if nothing ever has been or ever was entered into it.  PSE5 Organizer is operating normally as far as I can tell.  I cannot seem to locate the former catalog information and it has not loaded the former catalog file information.  A new test catalog was made and it opens and shows the thumbnails of its four images.  I hope that the test catalog I made didn't overwrite anything that would prevent going back to the original catalog information.  The copies of the files can be restored as they were a few months ago, though, because there is a copy of them on an SD card.
    Thanks,
    Al
    (K3PXR)

  • Every time I am asked for my Apple password, I put it in and then it is not recognized.  When I answer the security question, I am told it is wrong.  I reset the password, try again, and we start all over again.  Not recognized.

    How can I get Apple to recognize me? Every time I try to put in my Apple password, it doesn't recognize it.  I try answering the security question, will not recognize it.  I end up changing the password then try signing in again and it won't recognize it.  We start all over again.

    Have you changed the email address associated with the Apple ID? I did, and learned the hard way that it caused a lot of problems. I had to delete that ID and create a new one, then it caused problems with iCloud because of my old email address. If that's not the case, you might need to set up a new Apple ID altogether. Sounds like a pain, but it's not too hard, and you only need to create a new email address. You can also set up new security questions for the new ID and it should be recognized when you enter the information in iTunes, the App Store, etc. If that doesn't work, I recommend calling Apple and explaining the situation. Here's the page for Apple support numbers depending on where you live:
    http://support.apple.com/kb/he57
    Hope this helps.

  • My iPod Touch is running on ios 7. In the last two and a half months all the apps of my iPod have been wiped out twice. I had to download all the apps all over again. Why is this happening?

    My iPod Touch is running on ios 7. In the last two and a half all the apps of my iPod have been suddenly wiped out twice. I had to download all the apps all over again. Why has it happened?

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Restore from backup. See:                                                
    iOS: How to back up                                                                
    - Restore to factory settings/new iOS device.             
    If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
      Apple Retail Store - Genius Bar                              

  • I have a current iPhone 5 with all my apps and games at certain levels, how do I use iCloud to transfer current game levels as only a few games have transferred and other games want me to start all over again on my new iPad?

    I currently have an iPhone 5 that I play games on regularly and I have just bought the iPad 4 and I want to transfer all my game progress from the iPhone to the iPad. I have turned on iCloud on both devices and backed up and while all my games transfer only some of the games maintain progress where others want me to start all over again. I pretty sure I doing something wrong... Can some help or give me idiot proof guidance on how do do this successfully. I'm generally pretty tech savvy but this has me stumped and iCloud is ment to be easy to use.

    I would not be able to give you idiot proof guide, since different games are different. Some of them have icloud integrated already, but those already taken care of. Some of them use specific logins and once you log - you get your info. General recommendation is to contact support sites of those games for enabling icloud instructions or enabling of transfer. There are other purely apple ways - like sync your phone in itunes and then sync apps with ipad, but those are only one time transfer. There is another way that is not typically recommended - restoring ipad from iphone backup. It may transfer your game content, but once again sync in the future has to be done by game.
    So if I were you, I would address that individually with every game provider.

  • HT1977 My Computer crashed so I have had to download iTunes all over again. The problem is now I can't sync my Apps to my iTunes. It doesn't let me arrange them or anything when plugging my iPad in. The screen is greylike and won't let me select anything

    Hi Guys,
    My computer crashed and I lost everything. I got a new one and downloaded itunes all over again. When I plug my ipad in even after authorising my computer it will still not let me edit anything on the ipad. The screen is grey like on the ipad section and i cant select an app or anything. I have transfered purchase apps but all it does is take movies and tv shows accross. It wont transfer the apps into itunes. Please help

    As far as I know, iTunes will still not change anything until you click on Apply in the lower right corner. I fiddle with my settings all the time - just so I can get a sense if what to expect should I make any changes - and I have never seen anything happen to my configuration unless I click on Apply in the lower right corner of iTunes. Not only that - you have turned off auto sync so as far as I know you still have to click on sync or apply in order for the iPad to sync with iTunes.
    That doesn't mean it will not happen, I've never seen it happen - is all that I'm saying. I'm sorry but I'm not sure what will happen, but the only reason that I can of why the apps will not transfer is because of the manual manage setting. I could be wrong about that as well.
    Look at this discussion - which I have referred quite a few users to read. I know this process has worked for a number of people that have read it and used the instructions in it. Maybe we are missing something - what that would be - I'm not quite sure, but take a look.
    https://discussions.apple.com/thread/3305461

  • When I only want to close the current window to return to the previous window, the whole firefox site closes down, I end up back at my desktop & have to start all over again. How can this be fixed?

    If I close a window I should be back at the previous window that I was at when I followed a link to this window. At least that's the way Internet Explorer works, which I have used for years. The only thing that prevents me from using Firefox exclusively is that it is very time consuming to have to start all over again from scratch every time I close a window. For instance, say I type "cats" into the search box. It gives me links to a list of "cats" sites. I go to a "cats" website, decide I don't like it so close the window to return to my list of sites, but instead of returning me to the list, I end up at my desktop. Then I have to start all over, just like I had not even been online. Very aggravating. I don't know how else to describe the problem, I can't believe that other people haven't had a similar complaint, unless I just have some settings wrong?

    Now up to Firefox 8 and the problem persists. Cannot go to the www.turnitin.com page and login as I used to do -- Firefox does not remember my username or password.
    Still works on Windows, and with other browsers... It would be great if a fix is available.

  • After I download Itunes, when trying to sync Ipod, message says "needs newer version of mobile support, uninstall Itunes, and reinstall Itunes, and the same process starts all over again. why is that?

    after I download Itunes, when trying to sync Ipod, message says "needs newer version of mobile support, uninstall Itunes, and reinstall Itunes, and the same process starts all over again. why is that?

    Try removing and then reinstalling the Apple software using these instructions.
    Removing and reinstalling iTunes, QuickTime, and other software components for Windows Vista or Windows 7
    The above containes a link for XP. Also. make sure you install the correct Apple software, It comes in 32 and 64 bit and you need the one that is the same as the computer OS

  • HT1364 I have moved my library to an external hard drive and changed the location of the iTunes media folder in Preferences, but every time I close and re-open iTunes, I have to do it all over again.  How can I make the iTunes media folder change permanen

    I have moved my library to an external hard drive and changed the location of the iTunes media folder in Preferences, but every time I close and re-open iTunes, I have to do it all over again.  How can I make the iTunes media folder change permanent?  I have an older machine with Windows XP.

    I don't believe mounting the hard drive should be necessary, unless you have several external drives and want your computer to recognise them as folders, rather than drives. I've never had to mount a hard drive, ever. If you don't know how to do it, then it shouldn't be necessary now.
    Try this:
    Prepare iTunes so that it can see the external drive.
    Make a note of which drive-letter the external drive has been allocated. (Look in Windows Exploer)
    Look at the file location for a song. Make sure it plays (and therefore that iTunes has found it). Highlight it and select File/Get Info/Summary>Where: and make a note of the drive letter for that song.
    Close and shut down the computer.
    The next time you turn the computer on again, connect the external drive
    Before you start iTunes - check the external drive in Windows Explorer. Is it ready, does it have the same drive-letter that it had last time? Can you go into the drive and see the files on it?
    Once you can, start iTunes. (If the drive lettter has changed, you need to work out why before going any further.)
    If iTunes fails to find your external drive, you need to check where iTunes is looking for your Library.
    Select the same song you checked before (presumably iTunes can no longer find it). Follow the procedure for locating it. You should be able to see where iTunes thinks the file is. It's the drive that counts. Which drive letter is iTunes looking at? Is it the same one that it was previously (which should also be the same one that the drive has now).
    What happens, which step do you have problems with?
    Message was edited by: the fiend

  • HT203167 I had 25 tv shows in my itunes library, and 3 movies. Now there all gone, I can access them thru the store but I dont want to download all over again. There was like 50 gb of video. What do I do, Its impossable to contanct apple about it.

    I had almost 30 different seasons of tv shows in my library, alot. Now there all gone, my library is blank. My purchases are in my purchasd section on the store but I dont have enough space to download them all over again. I cant figure out what happend to them. I just watched one, then turnd my pc off, and later that day they were gone. And its IMPOSSABLE to contact apple about it, I dont know why its so hard to ask them any kind of question... Please help..

    Welcome to the Apple Community.
    The Apple TV 2 will play all the content in your iTunes library that your Apple TV 1 does. It can no longer sync any of it but can stream it all just as the older model did. Airplay is a different feature that lets you stream from an iPad/iPhone, the Apple TV 2 has Airplay the first didn't.
    You can still sort and search content by genre, it still marks content watched and unwatched and mainly still lets you organise much as the Apple TV 1 did, with one exception. It doesn't do nested folders, so the ability to tag a movie as a show (ie James Bond) and have all the associated movies in a James bond folder has gone and it lists all these movies individually.
    It has a similar situation with TV shows. It will put all TV shows in a series in a folder as the older one did, but the new one lists each series separately whereas the older model would put all the series in one folder.
    Not nesting folders is a bit of a pain with large libraries and whilst I don't like it, it's more or less the only compromise I have to make and of course I get additional features too.

  • How do I change an Apple ID payment method to 'None'? I've tried everything and the only solution is to get a new e-mail and start all over again. Any other options?

    How do I change an Apple ID payment method to 'None'? I've tried everything and I found the only solution is to apply all over again with another e-mail address. Any other options?

    Buy an iTunes Music Card and redeem it to your account - the "none" option should be available then.

  • I used the wrong ID for iCloud on my iphone 5. It is linked to an email that no longer exists. Do I have to delete my iCloud completely and set it up all over again?

    I used the wrong ID for iCloud on my iphone 5. It is linked to an email that no longer exists. Do I have to delete my iCloud completely and set it up all over again?

    You can change the linked email/sign in email for your iCloud and Apple ID accounts from 1 site,
    https://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa/
    Go to Manage your Apple ID
    Sign in with your current creditals
    On the left, click Name, ID and Email Addresses
    Under Apple ID and Primary Email Address, click Edit
    Type in your new Email.
    Go to Apple ID, click Edit
    Type in your new Email

  • So my computer broke some how and now it wont even turn on i just such without want to know if i can still have all my old songs and buying it all over again or something for please help me

    so my computer broke some how and now it wont even turn on i just want to know if i can still have all my old songs and such without buying it all over again or something so please help me oh also my ipod broke so i dont have anything that has my old songs except for the itunes ppl who know all of my songs

    You buy one download and one download only,  it is your responsibility to backup your music.
    it has always been very basic to always maintain a backup copy of your computer.  Use your backup copy to put everything back.
    If for some reason you have failed to maintain a backup ( not good), then you can transfer itunes purchases from an ipod:  File>Transfer Purchases

  • In iMovie 11, how can you cut/paste a clip that has subtitles and actually have the subtitles get cut/pasted. When I try, the subtitles disappear into the void and I have to do the subtitling all over again.

    In iMovie 11, how can you cut/paste a clip that has subtitles and actually have the subtitles get cut/pasted. When I try, the subtitles disappear into the void and I have to do the subtitling all over again.

    If you think this is a bug, you can report it here:
    Apple - Mac OS X - Feedback

  • As a new user of apple TV, I need some advice. When I rent a movie from Itunes for viewing later, it seems to download for a second time, with a message saying ready to view in 30 mins, it proceeds to load up all over again. What am I doing wrong

    As a new user of Apple TV, I need some assistance.When I rent a movie on iTunes and download for viewing later, say a day or two later, It seems to load itself all over again with a msg saying ready to view in 25 mins ! So having waited the 25 mins movie starts and runs for maybe 1 hour and the pauses for maybe 5 mins while it seems to load again . any help appreciated

    Welcome to the Apple Community.
    If you use the Apple TV for something else or turn it off it will erase whatever is on it's drive. If you are going to download content for later viewing you might consider doing it on the computer, downloads don't disappear until they expire and you can watch them as many times as you want.

Maybe you are looking for

  • How to setup new OC4J instance to host jdev business component (EJB)

    From Jdeveloper 9.0.3 I want to deploy a business component to an new oc4j instance running under 9ias version 9.0.3. In jdeveloper I have built and tested an application server connection (type=Oracle Application Sever Remote DCM) to my new oc4j ins

  • Poor quality after previewing in iDVD

    I created a movie in imovie '09 with video and still images.  Movie plays well and looks good when previewed in imovie.  I shared to media browser and opened the movie in idvd.  All of my chapters came up great and everything looked good until I prev

  • JTextPane and XMLParser and jdk .-) problems

    Hi there. I have a nice problem, which really gives me headaches. I have an XML editor (working as an applet or as an aplication, using a JTextPane). All worked ok untill jdk1.3 and parts even until jdk1.4. Now 2 big problems appeared. 1.Under jdk1.4

  • Change system font in 10G (linux)

    Is it possible ?

  • V31.0.014

    Where can I find v31.0.014 for n95 please help me!!!! Give me a link where I can download Those from my nokia they sent me an email with a link where I can download this version but accidentally I deleted. Solved! Go to Solution.