Differences from E4X - laverdet/js-xml-literal GitHub Wiki
E4X is an existing proposal to add XML literals to JavaScript, however it brings with it a lot of baggage which doesn't really have a place in modern applications.
XML's role in application will fall into two general categories: consumption and production. Consumption of XML is when you take a block of user or API-supplied XML, parse it, and retrieve some information from it. Production of XML would usually be constructing an HTML page. Interestingly, the two problems are quite different, and can be solved orthogonally. E4X attempts to solve both problems with the same standard, and in my opinion falls short of both. XML consumption has been largely solved by several existing libraries, SAX-style libraries being my favorite. Production of XML still remains ad-hoc and flimsy. js-xml-literal attempts only to solve this problem.
E4X brings with it a wealth of new operators and statements: namespace, @ (attribute identifier), .. (descendent operator), :: (XML namespace qualifier), and for each (while very useful, it doesn't really have anything to do with XML). js-xml-literal introduces no new operators, and instead leaves those operations to a more familiar DOM-style API.
The full scope of my qualms with E4X are outside the scope of this document, though.