Howdy,
Seth Caldwell wrote:
> Oh my god Toby, I just spent an hour because I was determined to learn about
> namespaces, and found a solution for you. =)
[snip]
> if(event.result.RDF.*::Status.*::presence.(@*::lang==”en”)==”Offline”) status
> = “Online”;
>
Nice one Seth.
Here is another solution that uses the namespaces. Note: the xml:lang is
changed to the aaa namespace(so i used that in the e4x) but I'm not sure
why that happens(i noticed it when i traced the xml).
//Create the default namespace.
var ns:Namespace = new
Namespace("http://www.skype.com/go/skypeweb");
//Create the aaa namespace that is used instead of "xml":lang.
var aaa:Namespace = new Namespace("http://www.w3.org/XML/1998/namespace");
function creationComplete():void{
var xml:XML = //assume it exists..
doIt(xml);
}
private function doIt(xml:XML):void{
//Set the namespace!
default xml namespace = ns;
trace(""+xml.status.presence.(@aaa::lang=='en')); // Away
}
cheers,
- shaun