In previous posts, I discussed the SpiderMonkey command line shell js and how to add support to it to enable full access (read, write, create, copy, delete, etc.) to the local filesystem via the File object and the NSPR library.
While rumaging around in the source code and documentation for js, I found that js partially supported the EX4 XML extension via a user configurable option.
This post looks at what it takes to load an XML document into js from your local filesystem, process it and write out the resulting document to your local filesystem using File objects and the E4X extension.
The basis idea behind E4X was that declarative languages such as XSL and XPATH are too complex for the average programmer to quickly learn and therefore a simpler way of accessing and manipulating XML documents was needed. Personally I do not agree with that assertion.
As an aside, currently Schneider is founder and CEO at AgileDelta which developed the Efficient XML binary format specification which I plan to write about in a future post. A W3C working group is currently developing the EXI specification which is based on the AgileDelta specification.
TO BE CONTINUED