This is a test application for E4X
scripting. It's target audience are Web/Software Developers.
The application is use-at-your-own-risk-software ;-). Read the
Note: The document is loaded Ajax-style (asynchronous); after
clicking, wait for the document
to appear in the text box below.
Note: For the document to work with Firefox 1.5 Beta 1 the XML document
must not contain an XML declaration. That means:
The line <?xml version="1.0" ...?> must not be
contained in the document.
Note: Since E4X implementations are in an early development
for execptions. The E4X Expression Tester was tested with Firefox 1.5 Beta 1 only.
This browser version identifies itself on Windows XP as
Your browser identifies itself as
If there are any differences you might discover problems with this application.
Note: An unsigned script may not access data on a remote server unless
you gave the permission. That means: If you try to load an XML document
from a server other than the originating server (linkwerk.com), you have to
Note: This is kind of a fake. An ECMA-357 implementation may allow
to map the W3C DOM (document object)
to an E4X XML object with var xmlDocument = XML(document).
Changing xmlDocument would then change the web page live.
At the time of writing this, Firefox throws an exception when trying to create an
XML object from the document object. A workaround uses
new XML(XMLSerializer().serializeToString(...)) to create
an XML object from the serialization of the HTML node.
The resulting XML object is suitable for read-only testing E4X expressions,
but since there is no connection between the XML object and the DOM
document object, any changes made to the XML object do not effect
the web page.
The loaded XML document is bound to an object named xmlDocument. Add whatever you
like after xmlDocument in the expression box below
to complete your E4X expression and click evaluate.
For example: Typing and evaluating ".*" prints the first child element (index 0)
of the root element.
Examples (1a): If you loaded the default XML document, you might want to try the
one of these expressions (copy & paste them to the input box):
Examples (1b): Meaningful examples depend on your XML instance. At least you can
try something like "..*" (all elements) or ".*" (first child of root element).
Examples (1c): You can access all elements and attributes of this web page. Please
note that element names are upper-case. Try "..P" to get all paragraphs or "..INPUT.(@TYPE == 'button')"
to get alle buttons.
E4X expression: xmlDocument