Packagesystem.text.html
Classpublic class HTML
InheritanceHTML Inheritance Object

The HTML tool class.



Public Methods
 MethodDefined By
  
HTML(text:String, convert:Boolean = true)
Creates a new HTML instance.
HTML
  
append(text:String, convert:Boolean = true):void
Appends the specified text in the HTML string.
HTML
  
decode(html:String):String
[static] Decodes the specified string.
HTML
  
encode(text:String):String
[static] Encodes the specified text passed in argument.
HTML
  
toString():String
Returns the String representation of the object.
HTML
Constructor Detail
HTML()Constructor
public function HTML(text:String, convert:Boolean = true)

Creates a new HTML instance.

Parameters
text:String — The HTML text value of the object.
 
convert:Boolean (default = true) — The convert flag who indicates if the html text must be encoded.
Method Detail
append()method
public function append(text:String, convert:Boolean = true):void

Appends the specified text in the HTML string.

Parameters

text:String — The text to append.
 
convert:Boolean (default = true) — Indicates if the text is encoded.

decode()method 
public static function decode(html:String):String

Decodes the specified string.

Example :

         import system.text.html.HTML  ;
         trace( HTML.decode("<b>hello world</b>" ) ) ; // hello world
         

Parameters

html:String

Returns
String — the decode string.
encode()method 
public static function encode(text:String):String

Encodes the specified text passed in argument.

Example :

         import system.text.html.HTML  ;
         trace( HTML.encode("hello world" ) ) ; // <b>hello world</b>
         

Parameters

text:String

Returns
String — a string encode text.
toString()method 
public function toString():String

Returns the String representation of the object.

Returns
String — the String representation of the object.