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

How do nested tags work in E4X?

Suppose I have the following XML: var foo:XML = this is a special case Is there any way to detect the position of relative to the contents of without a custom subparser?
0
votes
1 answer

Javascript E4X: How do I properly iterate over an attribute XMLList?

I have a problem with retrieving attribute values via E4x in javascript. Suppose a list of XML nodes like the following as the XMLObject:
FK82
  • 4,907
  • 4
  • 29
  • 42
0
votes
1 answer

Having trouble to access individual xml child in as3

Here is my problem. The photography data loads from the XML file. When the user clicks the button that information is overwritten an replaced by the names of all the users in the XML file. What I want to do is when a user clicks on one of the…
caribou
  • 53
  • 5
0
votes
1 answer

Fix internal links in JS

I just created a script which extracts the article out of a webpage via server-side JS. (If your interested: it's used for http://pipes.yahoo.com/fb55/expandr .) I just got a little problem with internal links. Some pages include links…
fb55
  • 1,197
  • 1
  • 11
  • 16
0
votes
1 answer

Is there a method in E4X to convert a XMLList of primitive data types into an Array similar to Array.join()?

Is there a method in E4X to convert an XMLList of primitive data types into an Array? For example, the Array class has a join method that converts an Array into a string and delimits each item with a comma using join(","). Is there a way to do…
1.21 gigawatts
  • 16,517
  • 32
  • 123
  • 231
0
votes
1 answer

How do I get all attributes of a specific name in E4X?

I have an XML document and I would like to get a list of all the attributes of a given name including descendent nodes. In this case I need to get all attributes whose name is "ISBN". Here is my XML:
1.21 gigawatts
  • 16,517
  • 32
  • 123
  • 231
0
votes
2 answers

e4x statement conflicts with local variable?

Somewhere in code i have decalred variable: [Bindable] var nameWin:String = ""; after this i have an e4x statement podContent.xml_m = xml_m.item.(nameWin=="necessary name"); that should compare item's namewin with "necessary name" and return only…
semen
  • 161
  • 2
  • 12
0
votes
1 answer

Is there a way to change the tab indent / formatting of the XML when exporting to a string?

I have an XML object that I'm exporting to a string like so: var xml:XML = new XML(myString); trace(xml.toXMLString()); This results in something like: However, the indentations are…
1.21 gigawatts
  • 16,517
  • 32
  • 123
  • 231
0
votes
1 answer

How do I make a parent node a child of it's child node in E4X?

How do I take a parent node and make it a child of it's own child node while at the same time making it the parent of it's grand children? For example, I have this XML:
1.21 gigawatts
  • 16,517
  • 32
  • 123
  • 231
0
votes
1 answer

How do I access the XML element data in AS3 when its has no tag

Here is the scenario: OLD XML data was in the form of : SomeData XYZ]]> Now a sub element has cropped up in some of the data: SomeData XYZ]]>
TSage
  • 17
  • 3
0
votes
2 answers

mulitple attribute xml filter as3 e4x

I am trying to come up with the best xml schema to support tag filtering. And then a method to filter the xml on an arbritary amount of tags. So here is the xml: var videoXML:XML=
Nick
  • 1
  • 1
0
votes
1 answer

e4x vs XPath: Which one to use when going with action script programming in Flex?

e4x programming extension is native to Actionscript and makes sense to use it over Xpath or any other DOM interfaces. I would like to know from flex community if they had any bad experiences like performance, etc, or any other gotchas.
Srikar Doddi
  • 15,499
  • 15
  • 65
  • 106
0
votes
1 answer

E4X: how to add a default namespase to exisitng E4X object

If the E4X object has been already created, then I am capable to add a new namespaces using, for example: addNamespace( new Namespace( "xsi", "http://www.w3.org/2001/XMLSchema-instance" ) ); However, my attempt to define a default namespace in a…
Shamil
  • 910
  • 4
  • 17
0
votes
2 answers

traversing ECMAScript for XML (E4X) - tutorial or example please?

I am using AS3 to traverse through XML but the Flash help is really insufficient here. Do you know any easy-to-read tutorial on how to traverse E4X in for loops or similar? (I don't think the question is Flash or AS3 specific as long as the tutorial…
daniel.sedlacek
  • 8,129
  • 9
  • 46
  • 77
0
votes
1 answer

Overwrite msg in mirth

I have two destinations now and the first calls a SOAP webservice. I want to take the response of that destination by: msg = new XML(responseMap.get('Destination1').getMessage()); and convert it to a mutable XML…
Ryan H
  • 547
  • 1
  • 6
  • 18