AS3 is a proud holder of three inline languages:
- XML
- E4X
- RegEx
I posted a references to usage of E4X in previous post. And here are two reference for usage of RegEx:
http://donttrustthisguy.com/2008/02/29/utilizing-regular-expressions-in-as3/
But what I would really like to show you in this post is some syntax wonders of inline XML. Have a look at this code:
<root/*an AS3 comment*/> <!-- XML comment--> some text </{(trace("let's close this tag"), "root")}> |
It is compilable code. And yes you can use AS3 comments and XML comments inside of inline XML.
You can also embed inline AS3 inside of inline XML and it will be evaluated at runtime. So the close tag is correct in this example.
I hope the parenthesis syntax is familiar from the previous post.
Place your comment