Erik's blog

Code, notes, recipes, general musings

playing with e4x in firefox: working w/ xml literals

leave a comment »

<script>
/*
ref: https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Processing_XML_with_E4X
1) create html file, e.g., "test.html"
2) copy paste the code below in it
3) run it in firefox w/ the firebug plugin:
4) look for the output in the firebug console
*/
var languages = <languages type="dynamic">
  <lang>JavaScript</lang>
  <lang>Python</lang>
</languages>;
console.log(languages);
</script>
Advertisements

Written by Erik

May 21, 2009 at 7:00 pm

Posted in tutorial

Tagged with , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: