Questions tagged [e4x]

E4X was an extension to ECMAScript which allowed for native handling of XML.

ECMAScript For XML (E4X) was an extension to ECMAScript which allowed use of XML literals, as well as accessors and filters for working with such XML. Its ability to allow embedding of JavaScript also was convenient for building XML-based templates.

Standardized in ECMA-357, it was supported in Mozilla's Spidermonkey and Rhino Javascript engines, and was included in the Firefox web browser between versions 1.5 and 20.

Warning: E4X is obsolete. It has been disabled by default for webpages (content) in Firefox 17, disabled by default for chrome in Firefox 20, and has been removed in Firefox 21. Use DOMParser/DOMSerializer or a non-native JXON algorithm instead.

More information can be found at https://developer.mozilla.org/en/e4x

260 questions
12
votes
2 answers

E4X with NodeJS

Is there any way to get E4X(ECMAScript) to work with NodeJS? It would really help to output slick html/xml without hassle/noise. It works fine using SpiderMonkey since it is natively implemented, but it doesn't seem to work with NodeJS. using…
zanona
  • 11,379
  • 24
  • 78
  • 137
12
votes
1 answer

Creating a DOM NodeList

I'm implementing all of the optional E4X features described in ECMA-357 Annex A and I'm having trouble implementing domNodeList (§A.1.2 and §A.2.2). How would I create my own NodeList object? Even if I create a new XMLDocument and append every…
Eli Grey
  • 32,712
  • 13
  • 69
  • 92
11
votes
4 answers

E4X browser support

I'm trying to figure this out, but there's not much information. Which browsers support E4X, and why isn't it more widely adopted?
ChrisOh
  • 289
  • 1
  • 2
  • 8
9
votes
6 answers

E4X Add CDATA content

Basically I need to define a node name and its CDATA content using variables. var nodeName:String = "tag"; var nodeValue:String = ""; Naively I thought this would work : var xml:XML =…
Theo.T
  • 7,905
  • 3
  • 21
  • 34
8
votes
1 answer

How to decode HTML entities

I have string variable with HTML entities: var str = 'Some text & text'; I want to convert (decode) it to original characters: Some text & text. JavaScript doesn't have built-in function to achieve wanted result. I can't use jQuery or DOM…
rik
  • 383
  • 2
  • 9
7
votes
3 answers

Reading Non Standard Namespace XML using E4X in AS3?

I am trying to parse some XML in AS3 that I recieve thru a WebService call to C#. C# is serializing using a DataContract so the namespace is non standard. Here is what the xml looks like:
Luke Belbina
  • 5,192
  • 11
  • 46
  • 69
6
votes
1 answer

Why was E4X deprecated and removed from some browsers?

Why was E4X deprecated and removed from some browsers? Warning: E4X is obselete. It's been disabled by default for chrome in Firefox 17, and completely removed in Firefox 21. Use DOMParser/DOMSerializer or a non-native JXON algorithm…
1.21 gigawatts
  • 12,773
  • 23
  • 85
  • 187
6
votes
3 answers

XML literals in JavaScript?

E4X (Ecma-357) is an extension to ECMAScript that adds XML literals as first-class primitives. That's awesome, but with only Mozilla and Adobe support (without V8 and IE support too), E4X is virtually dead from a web developer's perspective that…
ChrisOh
  • 289
  • 1
  • 2
  • 8
6
votes
4 answers

Java: Ways to parse XML in E4X?

I was wondering if there was a way to parse XML using E4X, or something similar to E4X. Does such a framework / library exist? Thanks!
bguiz
  • 22,661
  • 40
  • 140
  • 226
6
votes
3 answers

Count the number of nodes in an XML snippet using Javascript/E4X

Consider this problem: Using Javascript/E4X, in a non-browser usage scenario (a Javascript HL7 integration engine), there is a variable holding an XML snippet that could have multiple repeating nodes. Barney
p.campbell
  • 91,713
  • 61
  • 243
  • 314
5
votes
1 answer

Is .@ a Javascript symbol?

I find the following code in some file: var node = ; node.@name = "titleName"; The node is <title> <name>titleName<name/> So What's the .@ operator meaning?
zzy
  • 1,636
  • 1
  • 11
  • 40
4
votes
1 answer

Are there any syntactic differences between ECMA-262 and ECMA-357?

I'm writing a JavaScript parser based on ECMA-262. I'd be interested to know how much I'd need to change to make it ECMA-357 compatible. Are there any syntactic differences?
Nick Brunt
  • 8,361
  • 6
  • 48
  • 80
4
votes
3 answers

E4X: grab nodes with namespaces?

I want to learn how to process XML with namespaces in E4X so basically here is what I want to learn, say I have some XML like this:
JD Isaacks
  • 51,154
  • 89
  • 267
  • 413
4
votes
5 answers

Creating a new attribute in an XML node using E4X in AS3

Is there any way to do it?
TurboHz
  • 2,056
  • 2
  • 15
  • 14
4
votes
2 answers

Programatically enable/disable menuBar buttons in Flex 4

I have the following XML in my Flex4 (AIR) project that defines the start of my menu interface:
Hamid
  • 4,200
  • 10
  • 40
  • 71
1
2 3
17 18