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
2 answers

Converting an XMLDocument to E4X in AS3?

I'm attempting to convert some AS2 XML code to E4X. I have the following code original XML (now XMLDocument) syntax below: //temp var used to access createElement and creatTextNode var tempXML:XML = new XML(); //make an element:
1.21 gigawatts
  • 16,517
  • 32
  • 123
  • 231
0
votes
1 answer

Filter element by attribute with namespace in E4X

I have an XML like this: Default name English Name
stz184
  • 363
  • 3
  • 12
0
votes
2 answers

Select a Tree item

I'm working on a tree component using a XMLLIST as a data provider.
user454530
  • 101
  • 7
0
votes
1 answer

Updating an actionscript xml object directly in one line using e4x?

Given the following xml:
John 1000000
I know that is it…
Pete
  • 1
0
votes
2 answers

Flex: Listening for CollectionEvent in custom component

(EDIT: I've edited my question to make it simpler, sorry if some answers are out of context) I have prepared a reduced test case for my question: I'm trying to create a custom component which is being fed with XML data coming from the…
Alexander Farber
  • 21,519
  • 75
  • 241
  • 416
0
votes
1 answer

Is there an XML node.firstChild equivalent in E4X?

What would be the equivalent of node.firstChild in E4X? I do not see any articles mentioning what the equivalent would be.
1.21 gigawatts
  • 16,517
  • 32
  • 123
  • 231
0
votes
2 answers

Local directories-files list using jcraft.jsch

I need to transfer list of files from different directories to the destination. I am using JSch library for this purpose. I can get the list of files or directory list with below mentioned code for the Remote machine. var jsch = new…
Sachin
  • 13
  • 3
0
votes
2 answers

flash AS3 e4x - getting hold of child nodes

I am aware that you can use syntax such as: xml..Group And this is supposed to return an XMLList of Groups anywhere in the xml. This works fine if I have more than one , but fails if there is only one . Am I wrong in my assumption that it should…
Neil
  • 7,861
  • 4
  • 53
  • 74
0
votes
0 answers

Parsing Elements in XML

I can Parse the below XML that comes back as a string like below lets call it variable segments var Segments =
0
votes
0 answers

ActionScript: using variable expressions w/E4X descendant accessor (..)

I'm using a descendant accessor like so: var myxml:XMLList = new XMLList; ... myxml..node and would like to replace it w/ const sNode:String = 'node'; myxml..[{sNode}] This sort of thing has worked before. const sAttrib:String =…
Opux
  • 702
  • 1
  • 10
  • 30
0
votes
1 answer

Error adding TAG to XML and using variables (E4X)

I am just learning Javascript and XML and have two problems. This is the XML code I am using: var xmlVar =
0
votes
0 answers

php 5.6.11 xampp xml worse formatted

Today, I work with Zend 6.3 community edition. This version include PHP Version 5.5.7. I use php and mySQL to load data inside Adobe Air application by httpService with e4x result. As I work with french language I had to manage characters with…
Flex60460
  • 933
  • 2
  • 18
  • 49
0
votes
1 answer

How do I compare attribute to a lower case value?

How do I create a filter where the attribute value is lowercase? This works: xmlItem = xml.*.(attribute("name")==propertyName); But this is throwing an error: xmlItem = xml.*.(attribute("name").toLowerCase()==propertyName);
1.21 gigawatts
  • 16,517
  • 32
  • 123
  • 231
0
votes
1 answer

How do I filter by attribute and value across multiple elements?

I'm trying to find a XML node by checking it's type (type is an attribute). I can do this successfully with the following code: var xml:XML = describeType(this); var classname:String = getQualifiedClassName(mainGroup); var xmlList:XMLList =…
1.21 gigawatts
  • 16,517
  • 32
  • 123
  • 231
0
votes
1 answer

How can I create and Apache Axiom element from a E4X object from a script running in Rhino?

I am running a script running in Rhino, which creates an E4X object like this: var s = Google Search https://google.com I want to…
Tahir Akhtar
  • 11,385
  • 7
  • 42
  • 69