YouTube - preview, no autoplay no flash

By khopesh Last update Oct 13, 2008 — Installed 2,559 times.

unrelated

in
Subscribe to unrelated 3 posts, 2 voices



Avindra V.G. Scriptwright

on your guide about e4x, you should add the fact that you can use xml/html-style comments if you wanted to comment, via

<!-- 
multi-line
xml comments
go in here!

blah blah <p></p> <== These are acceptable in an XML comment.

 -->

also, why do you use "r" for the root xml element?
it can be just:

<><![CDATA[
Hello! I am still a good e4x object!

]></>

 
khopesh Script's Author

Hmm, interesting. All the resources I found online used <r>, and I think I prefer it because it otherwise looks like there's some ascii art going on there.

As to comments inside the XML, yes you can. I'm pretty sure you can put anything in there, and since there's no schema, only comments will be recognized (right?). Everything else is just a character ... of course, if you're sticking that inside a document.write() for example, anything inside is rendered as HTML, but it means that nothing is interpreted or escaped by the E4X syntax (except comments, which would be absent in the generated source of a document.write()).

 
Avindra V.G. Scriptwright

Yes, the <!-- --> comments will not appear when it's casted to a string. I just suggested to put it in the guide to allow people to comment, since:

/*
  comment
*/

or 

// comment

no longer work