E4X stands for “ECMAScript for XML” and ECMA in turn stands for European Computer Manufacturers Association. ECMAScript for XML (E4X) is a programming language extension that adds native XML support to ECMAScript. It is the next gen of Scripting Language.
ECMA is the standardizing and organization JavaScript. ECMA has also developed standards for quite a few stuffs apart from JavaScript e.g. Optical disks, Magnetic tape and C# language etc.
E4X is available to both Firefox and ActionScript developers that turns XML into a native data type on par with strings, arrays, objects, and regular expressions. Worth to mention its not the DOM equivalent of XML but is a distinct entity itself which has its own set of methods. E4X is implemented in SpiderMonkey (Gecko’s JavaScript engine) and in Rhino (JavaScript engine written in Java).

Why work with E4X when you can do the same thing with JSON objects?

JSON is marginally more compact to encode— than for attribute intensive XML or element heavy encodings. But this advantage disappears if the resource is gzipped as for both the cases we are storing labels and associated values. Thus if transmission is concerned then gzipping the content will occur as a matter of fact and the speed becomes insignificant comparison. Apart from this some very interesting work is going on with EXI (i.e. Efficient XML Interchange) that to at W3C level that is trying to make EXI more compact than even compressed JSON.

Key features of E4X include:

  • ECMAScript for XML specification defines a new set of classes and functionality for working with XML data.
  • E4X can be used for creating templates for dynamic content.
  • Using E4X functionality is much easier and more intuitive than “walking the DOM”.
  • You manipulate XML data with well-known operators, such as the dot (.) operator.
  • Use the @ and (.) operators not only to read data, but also to assign data.
Limitations of E4X:
  • E4X doesn’t support parsing XML declaration
  • It is not currently possible to access a DOM object through E4X.
  • Share/Bookmark

As described in Wikipedia, Search engine optimization (SEO) is the process of improving the visibility of a website or a web page in search engines’ “natural” or un-paid (“organic” or “algorithmic”), search results. In general, the earlier (or higher ranked on the search results page), and more frequently a site appears in the search results […]

  • Share/Bookmark

Web design in complicated and requires a lot of time and knowledge — and patience. It’s no longer just embedded text background images and slices; it’s interactivity and dynamic content, it’s HTML5 and mobile development, it’s JSON objects and Local Storage. Advertisement Web design in complicated and requires a lot of time and knowledge — […]

  • Share/Bookmark

The default templates and themable functions contribute a good deal to the productivity on a Drupal site, and several are positioned on the page through the assignment of blocks to regions. Today we will focus mainly on how to control the formatting of a site’s various modules and blocks. 1. Dynamically Styling Blocks: Block output […]

  • Share/Bookmark
Tags:

In drupal the form is rendered using the form rendering system, which doesn’t include template files. To theme the profile 2 form we use “hook_theme()”. Go through the steps: 1. In this step copy the code in template.php of the theme or any php file and include the file in template, php used with proper […]

  • Share/Bookmark
Tags:

Google Calendar and similar other online calendaring applications provide simple centralized systems, where online communities can maintain event calendars and community members can extract information about upcoming events. But many organizations prefer to display event calendars on their community portals, forums, or blogs. They often copy event calendar information from online calendaring applications onto their […]

  • Share/Bookmark

Today we will learn a few interesting things about SQL Query Optimization. How to get query execution time and executed query number? Follow the code given below: function timer() { $time = explode(‘ ‘, microtime()); return $time[0]+$time[1]; } $beginning = timer(); $timer_queries += round(timer()-$beginning,6); The sql query becomes faster if you use the actual columns […]

  • Share/Bookmark
Tags:

We can see various type of password strength meter when we are registering on different types of websites. Here I will show you how to create a simple password strength meter using JavaScript and PHP. There will be three steps: 1st create a html form: {form method=”post”} {h1}Password strength meter{/h1} {label for=”pass”}Password{/label} {input type=”password” name=”pass” […]

  • Share/Bookmark

Meta tags are HTML codes that are inserted into the header on a web page Meta tag helps Google search simpler. The word Meta means information about.  Meta tag gives information inserted into the “head” area of your web pages. Meta tags, for example, can tell a browser what “character set” to use or whether […]

  • Share/Bookmark
Tags:

Here are 9 of the top 52 tips on how to optimize your website for its turbo-charge rocket ride up the search engine rankings. Be bold: Use the <b> </b> tags around some of your keywords on each page. Do NOT use them everywhere the keyword appears. Once or twice is plenty. Deep linking: Make […]

  • Share/Bookmark
Tags: