Skip to content

Instantly share code, notes, and snippets.

@nicholasdunbar
Last active August 29, 2015 13:56
Show Gist options
  • Save nicholasdunbar/8795139 to your computer and use it in GitHub Desktop.
Save nicholasdunbar/8795139 to your computer and use it in GitHub Desktop.
Example of XML with embedded variables in ActionScript 3 (AS3)
// 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