[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Objectifying XML - JavaScript Extensions for XML (E4X) - Comments?

  • To: xml-dev@l...
  • Subject: Objectifying XML - JavaScript Extensions for XML (E4X) - Comments?
  • From: Gerald Bauer <gerald.bauer@m...>
  • Date: Thu, 21 Jul 2005 10:48:51 -0700
  • User-agent: Mozilla Thunderbird 1.0.2 (Macintosh/20050317)

xml javascript
Hello,

  allow me to highlight the blog story tilted "Objectifying XML - E4X 
for Firefox 1.1" by Kurt Cagle. Kurt writes:

  Sometimes it's the little things that catch you by surprise. Deep 
within the list of the various new features appearing within Firefox 
1.1, there was a short one liner about a new extension to Javascript 
called E4X. I was kind of curious about this, given that there was very 
little else that I could uncover about this, but it turns out the E4X is 
shorthand for ECMAScript for XML, a language extension proposed to the 
ECMA late last summer.

  The principle behind E4X is simple, but very profound. Currently, 
Javascript is rather stupid about XML - if you want to manipulate XML, 
you have to create a set of interfaces and use the W3C DOM and 
frequently some VERY painful treewalking or convoluted XPath calls in 
order to be able to do anything with it. I've long wished that there was 
a simpler mechanism for working with XML, especially as web development 
code is increasingly moving to an XML basis.

  E4X does precisely this. It lets Javascript treat XML as a native 
application type in exactly the same way that Javascript handles 
strings, numbers and regular expressions. However, if this was all that 
E4X did, it'd be not much more useful than DOM.

  Howevever, the other aspect of E4X, the one that is most interesting, 
is the fact that it "objectifies" XML. In other words, it lets you 
convert an XML document into a representation of an object, without 
having to go through the long, involved steps involved in working with DOM.

  More @ 
http://www.understandingxml.com/archives/2005/06/objectifying_xm.html

 What's your take?  Do you see any need for adding XML as a native type 
to scripting or programming languages or are existing APIs such as DOM, 
SAX & friends good enough? Has anyone used E4X already and care to share 
your experience?

- Gerald

PS:  IBM has published an article on E4X titled "AJAX and scripting Web 
services with E4X" online @ 
http://www-128.ibm.com/developerworks/webservices/library/ws-ajax1

_______________________________________________________________
Vancouver XML Developers Association (VanX) - http://vanx.org

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.