Free Newsletters
InfoWorld Daily

InfoWorld
Log-in | Register
STRATEGIC DEVELOPER  

Playing with data using XML

ECMAScript  for XML provides the latest method of using XML to mold data

By Jon Udell  
October 08, 2004
 

Last December at XML 2003, I met with Jonathan Robie, one of my XML heroes. You’ll find his name on such core XML specifications as DOM, XML Schema, and XQuery. Jonathan is both a co-inventor of XQuery and, as XML program manager at DataDirect, a leading implementer of that standard. So he gets to combine theory with practice — nice work, if you can get it.

Free IT resource

Open Source Business Conference (OSBC) May 22-23, 2007

Sponsored by OSBC

Free IT resource

TechNet: More ways to know it, share it, and keep it running.

Sponsored by Microsoft

When we sat down to lunch, Jonathan’s comment on the keynote talk I’d given the previous day was: “You like to play with data.” Guilty as charged. My slides, for example, were XHTML rather than PowerPoint. Now that’s not unusual at an XML conference, but I did score some points when, on one of the slides, I clicked a link to reveal a JavaScript-based local search engine that performed a structured search of the contents of the slideshow. Using XPath expressions, I was able to search for images, external links, and quotes from Bill Gates and Tim Bray. Try it for yourself.

The title of the slide that contained my little search engine was “Fingerpainting on the universal canvas.” And not coincidentally, the two Gates quotes that it found were expressions of that noble concept, one from a 1990 Comdex keynote and one from the 2000 .Net announcement. It’s actually Bill’s fault that I’m obsessed with the notion of data as Play-doh — a tangible substance that we can squeeze, stretch, and explore directly. Microsoft hasn’t consistently followed through on that vision, but I’m sure it’s correct, and I’m always on the lookout for technologies that can help make it real.

A universal canvas requires a universal way to represent data. Other solutions are conceivable, but let’s accept for now that XML is a reasonable one, and that it’s here to stay. How does XML become Play-doh? The first answer, for me, was Perl with its XML::Parser module. Then came XSLT (XSL Transformation), which traded away procedural idioms to gain declarative transformational power. Then came Python with its libxml/libxslt modules, which married the procedural and declarative styles in a highly interactive way. That’s been my weapon of choice lately, but now there’s a new contender: E4X (ECMAScript for XML).

With E4X, XML becomes a native programming-language data type. The language is ECMAScript, popularly known as JavaScript (in browsers) and ActionScript (in Macromedia’s Flash player). I first heard about E4X from Adam Bosworth, who used it to manage the intelligent browser cache that was part of his Alchemy project. (Now that Bosworth has moved from BEA to Google, by the way, the future of that nascent open source project is uncertain.)

Meanwhile, the first generally available implementation of E4X has been built into the latest version of Rhino, the Mozilla project’s Java-based JavaScript engine. It was demonstrated to me recently by John Schneider, the chief technologist at AgileDelta and lead editor of the E4X specification. I was immediately inspired to try it out, and you can see some sample experiments on my Weblog. I’ll spare you the geeky details, but here’s the gist: More than any other technology, E4X makes XML data feel like Play-doh in the hands of a programmer. That’s not the endgame — I won’t be satisfied until users can reach into their XML data and make new things with it — but it’s a step in the right direction.





 


 
Jon Udell is lead analyst and blogger in chief at the InfoWorld Test Center.

  More of Jon Udell's column
  Jon Udell's Weblog

Newsletter Check out all of our free newsletters!
Enter e-mail address:




 

TOP NEWS:


»  Four quick tips for choosing an IM security product
71 percent of businesses will invest in real-time messaging this year. If you're one of them, be sure to protect your enterprise

»  Forrester analysts ID hot IT jobs
Research group finds 16 IT roles with a promising future

»  Nvidia claims 10 hours of HD video on Tegra chip
The Tegra 600 and 650 can be used with hard disk drives and are designed partly for mobile Internet devices

»  Database vendors add Google's MapReduce
Greenplum and Aster Data Systems will support Google's programming technique, developed for parallel processing of large data sets across commodity hardware

»  Network management: Tips for managing costs
New technologies, changing requirements, and ongoing equipment maintenance and upgrades cost money, but there are ways to manage expenses

»  EMC targets SMBs, branch offices with new low-end storage
Celerra NX4 highlights include thin provisioning, snapshot technology for data recovery and backups, and Web-based console for management of storage volumes




MIGRATING TO VISTA
Join Windows Vista Expert, Richard Whitehead as he presents the benefits and challenges of migrating to Windows Vista. Sponsored by Novell

»  Click here to view this Webcast
  Planning For A Disaster
This new, comprehensive Solutions Guide is your one stop source for Disaster Recovery. In it you'll learn how to reduce the likelihood of a disaster and to create a rock solid business continuity plan should you face a disaster situation. Sponsored by Equallogic

»  Click here to download now

- Special Advertising Partners -
WHITE PAPERS
 

» Technology White Papers Library

Technology White Papers by Topic

Technology White Papers E-mail Alert

Find out when the latest white paper is available:
 
 
INFOWORLD MARKETPLACE
 
» BUY A LINK NOW
 

FIND PRODUCTS AND COMPANIES
» COMPLETE PRODUCT GUIDE



TECHNOLOGY INDEX
• Applications
• Application Development
• Security
• Networking
• Wireless
• Platforms
• Hardware
• Data Management
• Storage
• Web Services
• Business
• Telecom
• Professional Services
• Standards

TECH WATCH 


What's the 411 on GOOG-411?
Just as Google has become synonymous with "performing a Web search," 411 is understood to mean "information" -- as in "what's the 411?" I was thus surprised to discover, from a billboard, no less, that the king of search is taking on the ...

Apple HTML source reveals 'iPhone Extreme'
"This one's a stretch..." reports AppleInsider. Um, yeah. Reporting on HTML code sightings of product names could be called a stretch, but iPhone Extreme has a ring to it. Now, that sounds like the product Apple should have released first, rather ...

COLUMNISTS

Unified under law
Ephraim Schwartz's Column and Blog (InfoWorld) - In the litigious world we live in, deploying a unified communications platform in your enterprise could...
» MORE COLUMNISTS

MORE INFOWORLD BLOGS


Open Sources 
Product Management
When I joined MySQL four years ago, there was quite a lot of debate about product management. We didn't actually have ...

Zero Day 
Botnet herders tending smaller flocks
New research backs up the theory that botnet operators are keeping their networks smaller in a continued effort to keep ...



• Advice Line
• Database Underground
• The Deep End
• Enterprise Mac
• Geeks in Paradise
• Grid Meter
• The Gripe Line
• InfoWorld Daily
• Inside IT
• IT Troubleshooter
• ITXtreme
• Open Sources
• ProdBlog
• Real World SOA
• Reality Check
• Security Adviser
• SMB IT
• The Storage Network
• Tech Watch
• Virtualization Report
• Zero Day

ADVERTISEMENT


RESOURCE CENTERadvertisement 

GOVERNMENT IT & POLICY
'If you don't go after the network, you're never going to stop these guys. Never.'
From the State Department, All the News for Inquiring Minds
TechPresident, the Internet Citizenry's New Consensus Taker



Sponsored Technology Links

 
 
 HOME  NEWS  BLOGS  PODCASTS  VIDEOS  TECHNOLOGIES  TEST CENTER  EVENTS  CAREERS   About | Advertise | Awards | RSS | Contact Us 

Copyright © 2008, Reprints, Permissions, Licensing, IDG Network, Privacy Policy, Terms of Service.
All Rights reserved. InfoWorld is a leading publisher of technology information and product reviews on topics including viruses,
phishing, worms, firewalls, security, servers, storage, networking, wireless, databases, and web services.

CIO :: ComputerWorld :: CSO :: Demo :: GamePro :: Games.net :: IDG Connect :: IDG World Expo
Industry Standard :: IT World :: JavaWorld :: LinuxWorld :: MacUser :: Macworld :: Network World :: PC World :: Playlist