package{
import flash.display.Sprite;
public class Main extends Sprite{
public function Main(){
XML.ignoreComments = false;
XML.ignoreProcessingInstructions = false;
var example:XML = <html>
<head />
<body id="main">
Welcome!
<!-- Start PHP -->
<?php
// execute some php code
?>
<!-- End PHP -->
</body>
</html>;
trace(example.*.comments().length()); // Displays: 2
trace(example.body.comments().toXMLString());
trace(example.body.comments()[1].toXMLString());
trace(example.*.processingInstructions().toXMLString());
}
}
}
|