E4X
维库,知识与思想的自由文库
|
ECMAScript for XML (E4X)是一扩展了ECMAScript(JavaScript)的程式語言,它增加本地XML支持,為ECMAScript程序員提供了一種感覺直觀的方式來訪問XML文檔。它的目標是提供一種使用簡潔語法的DOM接口用於訪問XML文檔。 一些非中文的文字因为尚未翻譯而被隐藏,歡迎參與翻譯。
is a programming language extension that adds native XML support to ECMAScript (JavaScript). It does this by providing access to the XML document in a form that feels natural for ECMAScript programmers. The goal is to provide an alternative to DOM interfaces that uses a simpler syntax for accessing XML documents. It also offers a new way of making XML visible. Before the release of E4X XML was always accessed at an object level. E4X changed that. It treats XML as a primitive (equivalent to a character, integer, or boolean). This implies faster access, better support, and acceptance as a building block (data structure) of a program. E4X is standardized by Ecma International in ECMA-357 standard. The first edition was published in June 2004, the second edition in December 2005. [编辑] 實現E4X在(至少部分地)SpiderMonkey(Gecko的JavaScript引擎)和Rhino中實現。 Mozilla Firefox是基於Gecko引擎的,所以它可以用E4X運行腳本。該規範相當新,只有1.5版本及以上支持。 Macromedia的ActionScript3腳本語言完整地支持E4X,ActionScript3在2005年末已可用。 注意:為了正確地在Firefox 1.5中運行E4X,你必須在腳本的HTML標籤中將類型(type)值後面加入“; e4x=1”字串(例:<script type="text/javascript; e4x=1">)。 [编辑] 外部链接
| |||||||||||||||||||


