Xml appendChild goes nuts?

Hello all,
when copying nodes from one XML object to another using appendChild(), sometimes the copied nodes aren't put at the end of the XML object.
I've added a file to test this:
Put a number into the field, ranging from 1 to 3, and click addNode.
It copies a specific node (FileID = 1,..3) from one XML object to another, and trace shows the result.
If I add 1,2,3,1,2 consecutively, then the last node '2' isn't added at the end of the new XML object, but somewhere in between.
I did find a work around by converting the node to a string and then appending that. But the fact that appending an XML node doesn't always put it at the end of the XML object puzzles me. It looks like a bug, doesn't it?
This is on Flash CS3.
Kind regards,
Henk

Seems the only way around this "bug" is to use an XMLList, like so:
var mxml:XML =
<onlinemedia>
  <ProductFile>
    <FileID>1</FileID>
    <FileName><![CDATA[JC11.jpg]]></FileName>
    <Tooltip><![CDATA[]]></Tooltip>
    <Description><![CDATA[]]></Description>
    <IsMultimedia>false</IsMultimedia>
    <Url><![CDATA[http://www.nn.eu/Handlers/GetFile.ashx?id=239&t=.jpg]]></Url>
    <Episode><![CDATA[act 1]]></Episode>
  </ProductFile>
  <ProductFile>
    <FileID>2</FileID>
    <FileName><![CDATA[JC11.jpg]]></FileName>
    <Tooltip><![CDATA[]]></Tooltip>
    <Description><![CDATA[]]></Description>
    <IsMultimedia>false</IsMultimedia>
    <Url><![CDATA[http://www.nn.eu/Handlers/GetFile.ashx?id=239&t=.jpg]]></Url>
    <Episode><![CDATA[act 1]]></Episode>
  </ProductFile>
  <ProductFile>
    <FileID>3</FileID>
    <FileName><![CDATA[JC11.jpg]]></FileName>
    <Tooltip><![CDATA[]]></Tooltip>
    <Description><![CDATA[]]></Description>
    <IsMultimedia>false</IsMultimedia>
    <Url><![CDATA[http://www.nn.eu/Handlers/GetFile.ashx?id=239&t=.jpg]]></Url>
    <Episode><![CDATA[act 1]]></Episode>
  </ProductFile>
</onlinemedia>;
var exml:XML =
<onlinemedia>
</onlinemedia>;
addn.addEventListener(MouseEvent.CLICK, addNode);
deln.addEventListener(MouseEvent.CLICK, delNode);
function addNode(evt:Event):void {
var lst:XMLList = exml.children();
lst += mxml.ProductFile.(FileID == varb.text);
exml.setChildren(lst)
trace(exml.toXMLString());

Similar Messages

  • The trackpad of my 13" macbook pro (mid 2012) has geen going nuts for about a week now. It randomly clicks and drags the cursor to all places on screen, it randomly clicks, selects and swipes. Have tried spm reset and pressure on whole trackpad. Help?!

    It goes nuts for hours and the next day it acts completely fine. My macbook is impossible to work with when the problem is active; it randomly clicks, drags, selects and even selects words (in a yellow colour) to come up with latin(?!) translations.
    Ive tried the reset (option+cmd+r+p) and it seemed to work at first but now it doesnt seem to have any effect whatsoever.
    Also tried to apply pressure to the entire surface of the trackpad or just the top corners; no effect whatsoever.
    It's been quite an expensive purchase for a young student like me and i've really enioyed it until last week.
    I'd be relieved if someone came up with a solution; especially since its warranty has expired for half a year now.

    Hi there Bram3,
    You may find the troubleshooting steps in the article below helpful.
    Portables and Magic Trackpad: Jumpy or erratic trackpad operation
    http://support.apple.com/kb/ts1449
    -Griff W. 

  • Triggering events for the Lost Triggers!!! Going Nuts....

    Gurus,
    Oracle ver 11g
    I am going nuts and crazy here....
    Can you think of any possible reasons that I have lost all my objects that I created for triggers ( approx 65 objects) and how to get back those objects.
    I don't have the script to re-create all those objects again as I did it manually using the Toad and I am 1005 sure I saw all the objects created and was able to see them in sql*developer tool.
    We had a server crash and we had to reboot the server where this oracle is residing, but other than that I am have no reason how the objects disappeared...
    My belief is create trigger is a DDL command Right? so the objects should be there in the DB.but I am not able to see them any possible reasons>?? please advice when time permits
    Thanks
    Sheik

    Thanks ennisb for your reply.
    Do you have an export handy that you could restore from?
    ** No, I am not sure how I could do this. and whether we are doing it. Basically are you asking whether we are backing up the DB daily ( No I guess we are not backing up).
    Is Flashback logging turned on?
    ** Guess Yes, the Flash back is turned on.
    When was this server crash?
    ** I am sure I saw the objects on 8th Apr and were created on 7th and 8th and the Server crash was Y'day ( 09th).

  • Lately my iphone 5 is going nuts for some reason. siri pops up for no reason

    my phone is going nuts, it seem to activate siri on its on and takes pictures on the home scrren and some time the home button get stuck , please i need your help in solving this issue, my phone is new , it happens sometime when my phone is on a table with nothing touching it

    Sounds like you have a home button fault as both symptoms relate to the home button, e.g. Siri is normally activated by holding the home button. Screenshots are normally taken by pressing the sleep/wake button and the home button together so then you are switching on the phone it probably assumes the home button is also being pressed and takes the screenshot.
    You will need to make a Genius Bar reservation at your local store and take it in. They are able to replace the home button module on the iPhone 5 which is most likely what they will do. Just ensure you have a backup in case they do decide to replace the phone.

  • Adobe  Reader has not worked on my Safari for months. I have tried a new download 20  times! Works fine on my Google Chrome. Im running MacOS 10.9.3. Help! GOing nuts!!!!

    It has been months since I the adobe reader has been able to read a pdf link from Safari. I have to use Google CHrome if I want to read a pdf. I am running OS 10.9.3. My Mac is only 2 years old. I am going nuts trying to run the download... i have tried countless times and I still get adobvve reader bocked for this website on everything!
    sue

    Ah, Ok. I didn't know what was triggering the message. That is launching indeed. (I have to ask because many people a week don't know what it means).
    This message is the big problem, because it isn't even getting as far as the license agreement.
    I found a little discussion of this. It seems rare, especially on a Mac, but here is one person's advice. Worth a try:
    The error that you are facing might be due the reason that the user logged in doesn't have permissions to access the following directory: "~/Library/Application Support/Adobe". Can you please try the following steps with the user account in which you are facing the error:
    1. Remove the Adobe Reader from Applications directory by moving it to Trash.
    2. Now delete the following directory: "~/Library/Application Support/Adobe". Please note that this path is for the Library folder present inside the user directory that you are currently logged in.
    3. Restart the machine.
    4. Now re-install Adobe Reader XI.
    Tip: In Finder use GO TO FOLDER from the menu and type in "~/Library/Application Support/Adobe" (without the quotes but with the ~)

  • Can not access email addresses when they are a link. F/F goes nuts and "untitleed " keep flashing across the top of the screen.I have to get out of that page fast or manually shut down thwe computer.

    Can not access email addresses when they are a link. F/F goes nuts and "untitled " keep flashing across the top of the screen.I have to get out of that page fast or manually shut down the computer

    Use the trackpad to scroll, thats what it was designed for. The scroll bars automatically disappear when not being used and will appear if you scroll up or down using the trackpad.
    This is a user-to-user forum and most people will post on here if they have problems. You very rarely get people posting to say there update went smooth. The fact is the vast majority of Mountain Lion users will not be experiencing any major problems with the OS, or maybe with apps which are not compatible, but thats hardly Apple's fault if developers don't update their apps.

  • I bought an app that still goes nuts on advertising.  I deleted it and want my money back.  Can I get it?

    I bought an app that still goes nuts on advertising.  I deleted it and want my money back.  Can I get it?

    Hello,
    Thanks for using Apple Support Communities.
    If you'd like to request a refund for a purchase from the App Store, you can submit your request by following the directions below.
    To report a problem or request assistance with an item purchased from the iTunes Store, App Store, Mac App Store, or iBooks Store:
    Visit reportaproblem.apple.com in your browser.
    When prompted, enter the Apple ID and password used to initiate the purchase of the item, then click Sign In.
    Find the item you're having a problem with, then click Report a Problem next to it.
    From the Choose Problem menu, choose the issue you're having.
    Follow the onscreen instructions. You might be asked to describe the problem in a text field.
    Click Submit, and we'll review your problem.
    Report a problem with an item purchased from the iTunes Store, App Store, Mac App Store, or iBooks Store - Apple Support
    Take care,
    Alex H.

  • Aperture going nuts

    Booted up Aperture today, and it's as if it were posessed!  Not sure if this is some Apple prank in light of Halloween, or whether the application itself is drunk.  I've encountered two wacky issues:
    1) Aperture seems to have "lost" my top-rated picks from a recent interior photography shoot.  When I click on the file, it has a yellow badget (Image Not Found).  It won't allow me to export it.  The image is neither in my Aperture Trash nor my OSX Trash (neither of which have been empited since the images from this shoot were imported).  All other images from this shoot are fine, only the top-rated picks.  Very strange.  See screenshot below.
    2) Other images from that shoot (these are all RAW files) laod fine, except they exhibit drastic colors everytime I load up Aperture.  In some instances the images turn purple, other times yellow.  I can even export these as JPGs and they look completely wild!  See attached images.  RAW adjustements work fine, but there is no way to get back the original colors.  There seems to be adrastic shift in white balance and tint.
    I've already Repaired my Aperture Database and repaired permissions, all to no avail.  These 6 top-rated images (which the client had requested) have just disappeared.
    Does anyone have ANY thoughts on how something like this can even happen? I am running the latest Aperture on 10.8.5 iMac (Late 2012 model, 3.4Ghz i7 with 32GB RAM).
    Please anyone, help because I am pulling my hair out right now, and there is no phone tech support to call!
    http://www.materialized.com/temp/aperture_wild_2.jpg
    http://www.materialized.com/temp/aperture_wild_1.jpg

    Some further observations:
    Images seem to corrupt (and disappear) when I attempt to export originals.  Prior to that, I can make RAW adjustments and export the image as a version (JPG), but once I elect to export the original, Aperture goes nuts.  In one case the image turns purple/pink, in other instances it just turns plain black.  In another instances still, it shows that the image was not found (if that's true, how was I able to export versions and make RAW adjustments just a second ago?).

  • Backup going nuts

    I've posted questions about this problem with the backup (under 10.8.3) and watching it discovered that while normally the backup takes 3-5 minutes and occasionally 5-10 minutes for large updates of applications, every few days the backup will go nuts and backup 25-50 GBytes. The console logs will show the normal 2-4 GBytes required for padding for 200-1,000 MBytes of files but then just keep going for an hour or two before stopping for no obvious or apparent reason. I've deleted the .v100 file on the TC, move the disk out and back in the spotlight, done checks of the sparsebundle, etc. and nothing indicates anything is wrong.
    It would be nice if someone would make some suggestions what's left to check to determine why the backup is going nuts every 3-4 days and eating lots of unncessary disk space. The backup got better under 10.8.3 but this is still an issue which needs explanation since the log and the backup don't match.

    Does anyone know how to see what the backup is doing or what it's backing up? For the fourth time in 10 days it wrote the lines for the latest example:
    Found 99 files (2.2 MB) needing backup
    2.88 GB required (including padding), 533 GB avaiilable
    And then it went and ran for two hours to backup up over 50 GBytes of what I don't know.
    This is what it does every time and it's not consistent when it does it except it's every 3-4 days. I realize it's not really important since it deletes space to do a backup when the HD runs out of space, but doing these backups and deleting the space when it's full interfers with the disk usage and network resources with other applications running. It doesn't matter if I turn the backup off because it resumes where it was when I turn it back on.

  • My mouse goes nuts when listening to any au

    Specs
    3200+ AMD 64-bit 939
    GB DDR400
    6800OC
    extreme-music sound card
    I recently replaced my aging PCI52 to the extrememusic and now every time I play any audio what so every; my mouse goes nuts. It freezes and then moves across the screen. When all the audio is disabled my pc works fine.
    Please help
    Note:
    Onboard audio is disabled

    wow dancing mouse that react to music?? :smileyvery-happy: joking.....hehe
    Have you try changing the mouse to other USB port(assuming you are using usb mouse)

  • Flash Problems - Help Going Nuts!

    Hi all,
    I have a brand new MacBook Pro (13in) with all the latest patches for Mac OS, Safari and Flash etc etc... Unfortunately I do not seem to be able to get even a simple internet video to work, for instance even a small video on YouTube cannot run without constant stops and starts. How on earth do I get internet video to work properly, has anyone got any ideas as this new machine seems worse at viewing internet based video than my old Windows based Sony Vaio which I used in the 90's !!!! I cannot believe that a machine with 4GB of RAM and a decent fast processor cannot even be used to watch YouTube !!!!
    I have tried everything I can think of, I have reinstalled my Flash player, reinstalled Safari, repaired permissions on my HD, reset PRAM etc etc until I have lost all patience. Nothing seems to work. I have this same problem on any browser I try and use. To prove this I have tried, Safari, Chrome, FireFox and none of them seems able to play video off the internet without constant stopping and starting, it makes the whole idea of multimedia a complete waste of time as it's worse than pulling teeth.... It' driving my NUTS!!!! ARRRRRR...
    Can anyone suggest how I can restore my sanity and get internet video to work on this new wonder machine. I'm a website developer and have a client who just happens to use a LOT of video on his new site.... Trying to develop for this client on my Mac has turned into a NIGHTMARE. I'm even thinking the unthinkable and considering trying a Windows based PC as at the moment I can't seem to make any headway.:-(
    Any help GREATLY appreciated.

    *brand new MacBook Pro*, yet your profile info shows that you're running Tiger! If this is going on using wifi, then please state and tell us what happens when you connect directly to the internet. If nothing seems to fix your issue, take it back to whence it came and let them deal with it.

  • XML.appendChild();

    how do I append a child to an empty xml.
    var myXML:XML = new XML();
    var myOtherXML:XML = <Greeting> Hi <Greeting>
    var myOtherXML2:XML = <Name> James <Name>
    myXML.appendChild(myOtherXML) //TypeError: Error #1088: The markup in the document following the root element must be well-formed.
    myXML.appendChild(myOtherXML2)//TypeError: Error #1088: The markup in the document following the root element must be well-formed.
    basically I would like to combine two xml files into one xml file that does not have a root. Can this be done?

    the fact they are missing "/"'s is not the problem
    ...well that's the reason why you got those errors
    What you want to create is not an XML but an XMLList.
    var myXMLList:XMLList = new XMLList();
    myXMLList[0] = myOtherXML;
    myXMLList[1] = myOtherXML2;
    trace(myXMLList);
    Trace
    <Greeting>Hi</Greeting>
    <Name>James</Name>
    Kenneth Kawamoto
    http://www.materiaprima.co.uk/

  • I use aol mail, and I want to change my mailto: to aol. Firefox won't let me do that. When I click on an email link in a webpage, my computer goes nuts.

    When I click on an email link on a webpage, my computer goes crazy. (Please note that links to other websites are fine.) My computer seems to want to link me to Internet Explorer, which I don't use often. The computer starts running very fast and hot. Sometimes, I get a multitude of identical error messages from Explorer, and it is often hard to delete them!
    I thought maybe I could solve this by changing my mailto: client, but there is no link for Aol. Please help!
    Thanks.
    ericasaunt
    PS: Why am I still on AOL? I still use the first email address I got many years ago. Friends and clients know my email and use it to contact me. I don't want to change it.

    Hi, cor-el,
    Thank you for responding so quickly!
    I tried to follow the instructions, but it didn't work. There are 10 mimeTypes.rdf files on my computer!
    I tried to follow the website instructions of
    Tools -> Options -> Content / File Types -> Manage
    but once I get to Content I am stuck. No Manage button. (there is nothing that says File Types)
    What do you suggest?
    Thanks again.
    Sherri

  • Keyboard going nuts

    I posted a topic about a water spill issue a few weeks ago, and I'm telling you that this laptop gives me anxiety and depression...The keyboard must be damaged, here are some symptoms :
    - when i press some numbers, i hear a beeping sound, same beep when you press too many buttons at a time
    - then the keyboard goes crazy and starts typing on its own like : zero nine one one one one one one one one etc.... and doesnt stop. the browser goes full screen and it opens inspect element
    -after i make it stop numbers except five and six dont work.
    - i also noticed that after the water spill the power button didnt have lights but the light came back on and the problem started
     I really apreciate your help, and I hope i can fix this without having to replace the keyboard because without the numbers, u cant play video games or type some pretty important things

    It will depend on the availability and shipping cost to your place and how flexible you are with the keyboard layout (if you look for a seldom layout expect to pay more).
    Check for Ebay and alikes for any T410/T420/T510/T520/W510/W520 keyboard.
    /L40SX/240/240X/2*340CSE/360PE/365XD/380D/380E/380XD/380Z/390/560E/560X/2*570/2*600/600E/750Cs/755C/760CD/760EL/760XD/770E/A20p/A22p
    A31/i1600/G40/R50p/R61i/S30/SL510/2*T22/4*T4x/11*T6x/6*T4x0x/6*T5x0/3*W5x0/W700/3*X2x/4*X3x/3*X4x/5*X6x/3*X6xT/10*X2xx/2*X200T/4*X30x/Z60m/3*Z61x
    Comunidad en Español  English Community  Deutsche Community   Русскоязычное Сообщество

  • MY IPOD IS IN DISK MODE!!! HELP, I'm going nuts

    It's been working great. Loading up my itunes stuff. Going walking, It played great. Well, I went to use it this morning. I had left my headphones plugged in. (Maybe you are not supposed to do this?)
    It says "Disk Mode, DO NOT DISCONNECT. (I just connected it to my computer hoping it would stop saying 'SAFE TO DISCONNECT".
    That's what it had been doing since this morning. It had a big check in the middle of the screen and it said 'safe to disconnect".
    Since it was NOT CONNECTED TO ANYTHING, I was confused. And I don't know which side the hold thing is supposed to be on. Should I see the orange thing, or not. What side should it be on when it's locked?
    How do I get this thing to get out of Disk Mode?
    Pulleeeeze help!!!
    Melody

    Thank you so much.
    But just in case I have to buy another one. (This one is about 4 years old). I don't need anything fancy, no video or anything. And I don't want to shuffle anything. I just want to go walking, select the tunes I want and do my thing. So if I have to buy a new one, do they still sell the IPOD nano. Or do I have to buy some fancy updated version. I know there are 1st generation, 2nd generation, ones with videos, etc. Do you have any idea how much a simple Ipod Nano would cost??
    Four years ago I paid $149 for mine. One would think (with all the newer versions), that maybe my little Ipod Nano would now being sold for half the price? Do I have a shot here?
    Thank you so much for all your help!!!
    Melody

Maybe you are looking for