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
4
votes
4 answers

Many names of JavaScript / ECMA

I was looking up newer functions of JavaScript and found ECMAScript/ECMA 5. Because I had never heard of it I looked in to it more and found that it comes in the form of different names such as: JavaScript, JScript (Microsofts Variation),…
Tom
4
votes
3 answers

What is the Flex/AS3/E4X equivalent of this xpath query?

Given this document:
Chris R
  • 17,546
  • 23
  • 105
  • 172
4
votes
1 answer

How to check if an XMLList is empty in Flex

If I have an XMLList object in Flex, what is the proper way to check to see if the list is empty? Should I just compare the result of myList.length() > 0, myList.toString() != "" or try another method altogether?
Raul Agrait
  • 5,938
  • 6
  • 49
  • 72
4
votes
1 answer

Mirth java code to conditionally change a field

I'm using Mirth to read HL7 messages from our DB and send them out to a client's EMR. This particular EMR requires that the OBR and OBX for the embedded PDF are formatted a specific way. If OBR.4.1 and OBR.4.2 have "0PDF^PDF Report" we need to…
user2109799
  • 41
  • 1
  • 2
4
votes
3 answers

Can E4X Get Attribute of a Parent Node Based on Attribute of a Child At Any Level?

Consider this XML snippet with "nodes" which can have unlimited child levels of "subnode" elements. I want to find @type attribute of the node for any given subnode, based on its @id attribute. For example, if I have an id of 9 then I want to return…
Jake Howlett
  • 169
  • 3
  • 14
4
votes
2 answers

E4X select Nodes where descendants can be either A OR B or A && B

So I have this XML structure:
ukmikeb
  • 303
  • 1
  • 3
  • 15
3
votes
2 answers

XML, namespaces and E4X

Can someone explain me what exactly namespaces (xmlns="...") in XML are for and how they have to be used in navigating an XML using E4X (..preferrably in ActionScript 3)? I fail to fully understand their purpose and usage.
Mat
  • 4,281
  • 9
  • 44
  • 66
3
votes
3 answers

as3 namespace - get an attribute with a minus sign in it

Possible Duplicate: e4x / as3: How to access a node with a dash in its name. I've set the namespace for my XML to use SMIL and I'm able to pull the src attribute of an element this way: my.node.@src which gets "this is some URL" However, I have…
Jacksonkr
  • 31,583
  • 39
  • 180
  • 284
3
votes
1 answer

At-sign before square brackets

I'm currently maintainging some DS/JS code in Demandware and I just found that : var XmlReponse : XML = new XML(result.object.text); status = XmlReponse.@["STATUS"]; What does this unusual "@[...]" syntax do ? It could have something to do with…
Benj
  • 1,184
  • 7
  • 26
  • 57
3
votes
2 answers

Is there a way to get a hierarchical index to the node the cursor is in?

In the XML document I want to find the node that the cursor is in. I don't think Ace Editor can do this. But I think maybe it keeps track by using indexes system. What do I mean? Well, in XML there is a hierarchical structure of leaves and…
1.21 gigawatts
  • 16,517
  • 32
  • 123
  • 231
3
votes
1 answer

how to strip namespaces with e4x?

I have an arbitrary XML document provided by a URL. I also have an xpath-like expressions. var xml = some value; var path = "node1.node2.node3"; I need to verify if the above path into the…
SorcyCat
  • 1,206
  • 10
  • 19
3
votes
1 answer

Problem parsing XML using e4X & Flex 3

I am having difficultly parsing an XML file using e4X. I can acquire information from the 'version' tag, but I cannot from any nested tags. Could someone please point out what I am doing wrong? Here is the XML:
user180836
3
votes
1 answer

Alfresco scoped webscript configuration, can it be loaded into an E4X object?

I'm looking to use a scoped configuration file in an Alfresco javascript webscript. I started with this wiki page, and it got me mostly there. This jira page told me I needed to create a file spring-webscripts-config-custom.xml and place it in a…
MonkeyWrench
  • 1,809
  • 2
  • 24
  • 48
3
votes
5 answers

Load xml file in flex before application start/initialises

I've got a configuration xml file that I need to parse for values before a flex application laods. I've created a static class that allows for the values in the xml config file to be retrieved. I'm initialising this class when the application first…
Jon
  • 4,295
  • 6
  • 47
  • 56
2
votes
4 answers

Select json object based on key value pair

This might be a noob question, but I'm wondering if there's a way to select a json object without having to loop through key value pairs. I've done similar things with e4x, but I'm not sure how to do it syntactically for js. For example var data = …
FlavorScape
  • 13,301
  • 12
  • 75
  • 117
1
2
3
17 18