Converting an Attribute to a String : toString « XML « Flash / Flex / ActionScript






Converting an Attribute to a String

 


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

        var novel:XML = <BOOK ISBN="0141182806">
            <TITLE>Actionscript</TITLE>
            <AUTHOR>J, K</AUTHOR>
            <PUBLISHER>Penguin Books Ltd</PUBLISHER>
          </BOOK>;
        
        
        trace(novel.@ISBN.toString(  ));  // 

    }
  }
}

        








Related examples in the same category

1.If the XML object in question contains only a single node only the text value of the node will be returned
2.The toXMLString() method always return the full XML tag and all values contained within an element.
3.Printing Pretty
4.Setting the Number of Spaces per Indentation
5.Difference between toString and toXMLString
6.Converting an XML Element to a String