Assumptions are dangerous
Please don't top-post, reply below trimmed quotes. Don't quote
signatures or anything below them.
I assumed E4X was Javascript and I could access it in my browser using
my web server.
Strictly, JavaScript is a trade mark of whoever bought it from Sun
(probably Oracle I guess). It is the implementation of ECMAScript
(ECMA-262), DOM APIs etc. in Netscape and Mozilla browsers.
E4X is an extension to ECMAScript and is defined in ECMA-357. So a
JavaScript (or any other implementation of ECMAScript) could include
ECMA-357 if it wished. It has been implemented in Spidermonkey, which
is the script engine in Firefox, but not made fully available by
default (perhaps only for HTML documents).
That sounds like it was wrong.
Perhaps.
Do you mean I need a different doctype
for Javascript with XML or something like that?
It is intended to be used with XML documents, which should be valid in
regard to their XML document declaration and DOCTYPE (if included).
But you may be able to use it in HTML documents, according to the
Mozilla E4X documentation:
| In Gecko 1.8 based browsers such as Firefox 1.5,
| E4X is already partially enabled for web page
| authors. To fully enable E4X, the <script> element
| needs to have the MIME type "text/javascript;e4x=1"
If you have a web page I can read about this that would help.
I thought EcmaJS whatever was the overall standard and Javscript was
a flavor of it that pretty
The language is ECMAScript, the standard is ECMA-262, the current
edition is edition 5.
<URL:
http://www.ecma-international.org/publications/standards/Ecma-262.htm
JavaScript is one implementation of ECMAScript, there are many others.
The word "javascript" or "Javascript" or "JavaScript" is often used to
generically describe ECMAScript-based scripting environments used in
web browsers and other hosts.
much followed that standard so I don't know how you mean to implement
it or how you even know it is EcmajS
but it does make sense that I need an xml
file or something for this to work.
You could start with w3schools[1] but beware: much of what you learn
there will not be strictly correct (sometimes plain wrong) but it will
get you going. More authoritative but perhaps a bit harder to get
going with is the Mozilla E4X documentation linked to above. Judging
by the similarity between the tutorial and your posted code you may
have already discovered it.
1. <URL:
http://www.w3schools.com/e4x/default.asp >