I have an XMLListCollection object that contains items with an ID property. I want to find one particular item by id and then get it's index in the collection.
This is done to be able to tell the comboBox (whose dataProvider is the XMLListCollection) the index of the item to display.
...
Say for example, I have an XML file with 100 "person" nodes, and I want the first 30. Or possibly 51 - 100. Is there any way to do this with e4x syntax to return an XMLList?
...
Hi!
I'm working on Rhino (Mirth), and I've got to process / parse an XML with the following structure:
<root>
<row>
<foo-1 />
<foo-2 />
<foo-3 />
<foo-4 />
...
<bar-1 />
<bar-2 />
<bar-3 />
<bar-4 />
...
<something-else-1 />
<something-else-2 />
</row>
</root>
I want to get all the "foo" nodes only, avoiding the use of loops if possi...
How do I indicate the visit history on a flex tree component? I want to highlight the clicked/visited nodes to a different color and will not change after that, so that all the visited nodes will be one color.
I tried adding an attribute to the underlying XML by
var selected:XML=app.treeObj.selectedItem as XML;
if(!selected.hasOwnProp...
Whenever I call xml.setNamespace(ns), the namespace of the element is set to ns, but ns is also added as another namespace with it's own prefix to the element. I would like to know how to stop the latter from happening (I'm okay with modifying XML.prototype.function::setNamespace) without defining @xmlns as I can't use E4X syntax. Altern...
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?
...
Hi all. I'm using e4x to generate a HTML-snippet for my users which they can copy & paste into their blogs or web sites:
var xml: XML = <object>
<param name="..."></param>
<param name="..."></param>
<embed args="..."></embed>
</object>;
var html: String = xml.toXMLS...
I am getting an object back from ASP.NET, and when tracing the XML it as follows:
var xml:XML = new XML(event.message.body);
trace(xml);
I get the following output:
<ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://localhost:49329/">
<string>One</str...
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 domNode() representation of the nodes in an XMLList, I still don't see how I could create a No...
I am using javascript to manipulate XML in a non-browser context (no DOM), and am looking for an E4X expression to rename a list of tags. For any given tag, I don't necessarily know ahead of time what it is called, and I only want to rename it if it contains a given substring.
As I very contrived example, I may have:
someXML = <Favouri...
When for example returning JSON from a Google Spreadsheet, the object returned contains an array of entry objects (corresponding to rows in the spreadsheet).
An entry can have a name like so:
jsonObject.feed.entries[15].name = "xyz";
Can I easily return an entry with the name of "xyz" using shorhand notation (E4X) of some sort?
thanks...
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:
<NameOfRoot xmlns="http://www.theaddress.com/file">
<version>1.0</version>
<NameOfChild1>
<NameOfChild2...
The task is to send an XML object from Channel-A to Channel-B
<MyMessage>
<ID>42</ID>
<hl7v2>
MSH|^~\&|LAB|....
PID|1|....
</hl7v2>
</MyMessage>
The steps of the channel communication:
in the Channel-B's source transformer, extract the HL7v2 contents
OVERWRITE the current msg object in Channel-B with the extracted contents
c...
Hi,
I have an xml file (loaded in with URLLoader) that looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<localizations>
<words>
<Brand us="Brand Here"></Brand>
</words>
</localizations>
<world squareunits="100"></world>
</root>
Once loaded,what is the quickest way to access world.squareunits ...
One might think the corresponding E4X query for the XPath query, //*[@foo = "bar"], would be ..*.(@foo == "bar"), but that will throw an error whenever it gets to an element without a foo attribute. I am currently using ..*.(function::valueOf().@foo == "bar") instead.
My question is if there is another, less of a hack-way to do this.
...
Hi,
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!
...
<EFM>
<projects>
<project name="EFM Columbus Supply Chain Project">
<characteristics>
<characteristic name="Types of Data">
<textDescription></textDescription>
<options>
<option name="Commodity Flow" value="True"/>
...
So I'm having a slightly tricky issue...
I'm generating an XML file within a class I'm writing. Let's say this was the starting XML:
<base>
<container id="0">
<element type="Image" x="0" y"0" />
<element type="Image" x="100" y"0" />
<container/>
</base>
I want to add additional <element>'s. The first order of...
Heres some code for a test case. I don't understand why the first two queries produce a result but the third one doesn't. Any ideas?
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="onInit();" >
<mx:Script>
<![CDATA[
private function onInit...
Given this document:
<doc>
<element>
<list>
<key attr='val'/>
</list>
</element>
<element>
<list>
<key attr='other'/>
</list>
</element>
<element>
<list/>
</element>
</doc>
I want an e4x equivalent of the xpath //element[list/key/@attr="val"]. Is i...