package{
import flash.display.Sprite;
public class Main extends Sprite{
public function Main(){
var product:XML = <someCorp:PRODUCT
xmlns:someCorp="http://www.example.com/someCorp">
<someCorp:PRICE>99.99</someCorp:PRICE>
</someCorp:PRODUCT>;
var someCorp:Namespace = product.namespace("someCorp");
var qn1:QName = new QName("http://www.example.com/someCorp", "PRICE");
var qn2:QName = product.someCorp::PRICE.name( );
trace(qn1 == qn2); // Displays: true
}
}
}
|