XMLHighlighter class
Availability
Flash Player 6 (copy the XMLHighlighter class actionscript file to the same folder as the FLA or to the class path).
Description
Use the methods and properties of the XMLHighlighter class to generate the html code to generate color highlighted pretty printed XML
Method summary for the XMLHighlighter class
Method | Description |
XMLHighlighter.highlight() | Returns the HTML highlighted code for the specified XML document. |
Property summary for the XMLHighlighter class
Property | Description |
XMLHighlighter.useCDATA | Set to true by default. enables/disables the CDATA detection |
XMLHighlighter class
Availability
Flash Player 6 (copy the XMLHighlighter class actionscript file to the same folder as the FLA).
Usage
Parameters
source An XML parsed to generate the HTML String.
Returns
Color highlighted HTML String.
Description
Since it is a static class, call any of the methods of the XMLHighlighter class directly.
Note: Set XMLHighlighter.useCDATA=false if you don’t want to use CDATA for text nodes.
Example
The following example creates a new, empty XML object:
Resulting HTML