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
2
votes
1 answer

Why is my Atom data binding not working?

I've got a Flex application with Advanced Data Grids binded with XML and Atom feeds. With my XML file, the application works very well: jiraList = new XMLList(event.result.channel.item); However, when I try to access Atom feeds, I cannot go lower…
Florian
  • 71
  • 8
2
votes
3 answers

E4X: Use string as attribute name in expression?

I have a function that has this line: var returnString:String = items[0].@month; @month is an attibute on an XML node like so: OK but I need to abstract the attribute name so I can pass a string to the function and get the…
JD Isaacks
  • 56,088
  • 93
  • 276
  • 422
2
votes
1 answer

object detection in flash using haar-like feature

In OpenCV, we can use a xml file to describe haar-like features of a specific object. I wanna use this idea to detect palm and fist, now I hava my own xml feature file, and it works well in C and Python(with OpenCV), now I need to move this idea to…
PinkyJie
  • 817
  • 3
  • 8
  • 28
2
votes
1 answer

how to programmatically remove an attribute completely in flex?

I am experimenting with e4x. I could programmatically add an attribute to an Xml by doing something like this : xml.@name = 'jerry'; now i have added a name attribute to it programmatically because even though the xml had no attribute called name,…
helpdesk
  • 1,984
  • 6
  • 32
  • 50
2
votes
2 answers

E4X filtering in Spidermonkey

I'm using E4X in SpiderMonkey, and the majority of the language seems pretty solid, but I can't get filtering to work: var xml = Dave Ian John trace(…
Dave Stewart
  • 2,324
  • 2
  • 22
  • 24
2
votes
2 answers

How Can I get Remote Objects to return XML in E4X?

I'm writing a Flex application that makes full use of BlazeDS to a Java server. I use Remote Objects a lot, but I've come across an instance where receiving XML is cleaner and faster than returning objects. Returning XML through BlazeDS is easy…
DyreSchlock
  • 867
  • 3
  • 13
  • 24
2
votes
4 answers

Why, in AS3, are XML and XMList unrelated (inheritence wise) classes?

I can't help think that making XML ad XMLList both unrelated, as in both extend Object directly, is a design flaw in the AS3 core library. Surely having XML extend XMLList would be a much cleaner system, where XML is considered an XMLList with only…
BefittingTheorem
  • 10,459
  • 15
  • 69
  • 96
2
votes
1 answer

SMIL file xml isn't e4x friendly?

I'm loading in a smil file (follows the xml format) and it won't let me select properties via name (eg. xml.body) instead I can only access the data by xml.child(0). I've tried xml.child('body'), but still nothing. Anyone know a quick workaround? I…
Jacksonkr
  • 31,583
  • 39
  • 180
  • 284
2
votes
1 answer

Howto convert E4X XML Elements into JSON Notation

I have a server Implementation of ECMA Script including the ability to use E4X. Because this is pretty elegant for people don't know JavaScript and JSON Notation and we want to make an API which is most easy to learn i want to use this for my…
Chris
  • 7,675
  • 8
  • 51
  • 101
2
votes
2 answers

Android, XML parsing similar to E4X?

I am working on a project in Android now that involves parsing XML from a local file. I have done XML work extensiely in flex and have become used to the power and flexibility of E4X and it's capabilities. I wonder now if I can do something similar…
Hamid
  • 4,410
  • 10
  • 43
  • 72
2
votes
1 answer

Can C# / Linq add an XAttribute to a XElement after the XElement.Remove() has been invoked?

I'm currently translating portions of the chem4word project from C# to AS3. In the below code the XElement DelegateElement calls its Remove() method. If mark == true then it passes that XElement to have an XAttribute "deleted" = "true" but if the…
gltovar
  • 463
  • 4
  • 10
2
votes
1 answer

With E4X, can I turn off indentation?

If I've got something like: var x =
helloworld
and add it to some other expression, it gets rendered as:
hello world
But in HTML, the whitespace between and…
Ken
  • 1,159
  • 1
  • 9
  • 13
2
votes
1 answer

e4x: simplest way to tell if an attribute exists

What's the simplest way to tell if an attribute exists? p = ; js>p.@name.length() 1 js>p.@zebra.length() 0 I can use @attr.length() but was wondering if there is an isAttributePresent() or something. NOTE: This is not in a…
Jason S
  • 184,598
  • 164
  • 608
  • 970
2
votes
2 answers

Proper way to replace text in E4X element

I'm trying to remove double quotes from text nodes. The following code works: var cars = "Blue"
mtelis
  • 654
  • 1
  • 6
  • 10
2
votes
1 answer

How do I add another sibling element in e4x?

If I want to create: example1 example2 using e4x, and I already have: foo.bar = example1 How do I add the additional bar tag?
SCdF
  • 57,260
  • 24
  • 77
  • 113
1 2
3
17 18