From Seo Wiki - Search Engine Optimization and Programming Languages
| This article needs additional citations for verification.
Please help improve this article by adding reliable references. Unsourced material may be challenged and removed. (November 2008) </td>
In computer science and web development, XML Events is a W3C standard  for handling events that occur in an XML document. These events are typically caused by users interacting with the web page using a device such as a web browser on a personal computer or mobile phone.
An XML Event is the representation of some asynchronous occurrence (such as a mouse button click) that gets associated with a data element in an XML document. XML Events provides a static, syntactic binding to the DOM Events interface, allowing the event to be handled.
The XML Events standard is defined to provide XML-based languages with the ability to uniformly integrate event listeners and associated event handlers with Document Object Model (DOM) Level 2 event interfaces. The result is to provide a declarative, interoperable way of associating behaviors with XML-based documents such as XHTML.
Advantages of XML Events
XML Events uses a separation of concerns design pattern, and is technology-neutral with regards to handlers. It gives authors freedom in organizing their code and allows separation of document content from scripting.
This design has three drawbacks:
Relationship to Other Standards
Unlike DOM Events which are usually associated with HTML documents, XML events are designed to be independent of specific devices. XML Events are used extensively in XForms, and, in version 1.2 of the SVG specification as of July 2006, is still a working draft.
Example of XML Events using Listener in XForms
The following is an example of how XML events are used in the XForms specification:
<html xmlns="http://www.w3.org/2002/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xf="http://www.w3.org/2002/xforms"> <head> <ev:listener event="DOMActivate" observer="myButton" handler="#doit"/> </head> <xf:trigger xml:id="myButton"><xf:label>Do it!</xf:label></xf:trigger> <script xml:id="doit" type="application/ecmascript"> alert("test"); </script> </html>