Understanding the XML Classes : XML Object : XML Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » XML » XML Object »

 

Understanding the XML Classes


 


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

        var myXML:XML = <message>Hello, world!</message>;
//        An XMLList is a numbered set of XML objects.
        var list:XML = <list>
                           <item id="58" />
                           <item id="135" />
                           <item id="12" />
                       </list>;
        var items:XMLList = list.item;
        trace(items);
        trace(items.length());
        trace(items[1].toXMLString());
    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo XML
» XML Object