Last active
August 29, 2015 13:56
-
-
Save nicholasdunbar/8795139 to your computer and use it in GitHub Desktop.
Example of XML with embedded variables in ActionScript 3 (AS3)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Variables to embed: | |
// Tag names: | |
var l:String = "l"; | |
var a:String = "a"; | |
var b:String = "b"; | |
var g:String = "g"; | |
var c:String = "c"; | |
// Attribute name | |
var atribute1:String = "atribute1"; | |
// Attribute value | |
var answer:String = "some answer"; | |
//Byte code level compilation of XML | |
var testXml = <{l}><{a} {atribute1}="sadsdaf" atribute2={answer}> | |
<{b}> | |
<{g}>test</{g}> | |
</{b}> | |
<{c}>asdfdsaf</{c}> | |
</{a}></{l}>; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment