HOW TO: Delete an XML node using E4X

While creating a sample application for some class content the other day, I ran into an XML/E4X situation that I’d never encountered before. It is pretty basic – deleting a node from XML. How does one do it? With the delete keyword of course! For example: [as]var myXML:XML = Hamburger Fries Med. Soda Lg. Soda [...]

E4X XML Namespaces

For XML that looks like the following response from Yahoo’s weather service: When you need to access the nodes with complex node names such as yweather:location think XML namespaces. In the above example, look for the xmlns declaration in the rss node – xmlns:yweather=’http://xml.weather.yahoo.com/ns/rss/1.0′. Creating a Namespace object using the declaration will allow us to [...]

Sending XML in Flash

So you want to send XML in flash? There are some things that you need to watch out for. ONE: We’re working with the XML object. [as] var myXML:XML = new XML(); var theXML:String = “”; myXML.parseXML(theXML); [/as] TWO: If you are are expecting a response, use the sendAndLoad() method. You will need to create [...]

TranslateXML – AS2 XML to Object Parser

The TranslateXML class translates any XML file into a flash Object. All nodes are turned into Objects. Any duplicate nodes are turned into an array. download: RE_TranslateXML (2.62KB) added: 17/01/2009 clicks: 656 description: RE_TranslateXML class that translates XML structures into a generic object. Update – sample added: download: Sample: TranslateXML (13.50KB) added: 26/01/2009 clicks: 918 [...]