Get xml namespace : Namespace : XML Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » XML » Namespace »

 

Get xml namespace


 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){

        var catalog:XML = <html xmlns:shop="http://www.example.com/furniture"
              xmlns="http://www.w3.org/1999/xhtml">
          <head>
            <title>Catalog</title>
          </head>
          <body>
            <shop:table shop:id="4875">
              <table border="1">
                <tr align="center">
                  <td>Item</td>
                  <td>Price</td>
                </tr>
                <tr align="left">
                  <td><shop:desc>Table</shop:desc></td>
                  <td><shop:price>9.99</shop:price></td>
                </tr>
              </table>
            </shop:table>
          </body>
        </html>
        
        
        var htmlNS:Namespace = catalog.namespace(  );
        
        trace(htmlNS);

    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo XML
» Namespace