Two Namespace objects are considered equal if, and only if, they have the same namespace name, regardless of their prefix. : Namespace : XML Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » XML » Namespace »

 

Two Namespace objects are considered equal if, and only if, they have the same namespace name, regardless of their prefix.


 

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 ns1:Namespace = product.namespace("someCorp");
        var ns2:Namespace = new Namespace("sc""http://www.example.com/someCorp");
        trace(ns1 == ns2);  // Displays: true


    }
  }
}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo XML
» Namespace