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=
<?xml version="1.0" encoding="UTF-8"?>
<videos>
<video> <tags label="dogs,brown,lawns" /> </video>
<video> <tags label="dogs,cats" /> </v...
Is there any way to concatenate E4X expressions? If I store "half" a path in a variable, can I concatenate the way I do with Strings?
...
How do I parse an XML document that contains nodes where underscores exist?
<some_xml>
<child_node>
<child width_info="" height_info="" />
</childnode>
</some_xml>
I tried this:
for each (var item:XML in Environment._XMLData.some_xml.child_node.child){
trace(child.@width_info);
}
But that does'nt seem to work. I...
I need to archive a database-driven flash as3 website.
I exported a table to xml so now i have something like this:
<RECORDS>
<RECORD>
<id>home</id>
<msg>bodytext</msg>
<type>0</type>
<lastEditDate>0000/0/0 00:00:00</lastEditDate>
<lastAccessDate>2009/6/17 11:37:21</lastAccessDate>
<timesAccessed>855</timesAcce...
Hi, griends!
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 items whose nameWin matches with "necessary name".
xml_m.item:
<item>...
My XML Looks like this:
<?xml version="1.0" encoding="utf-8" ?>
<projects>
<project
id="1"
thumb="media/images/thumb.jpg"
>
<categories>
<id>1</id>
<id>2</id>
</categories>
<director>Director name</director>
<name><![CDATA[IPhone commercial]]></name>
...
This is just a simple question. I'm currently using Mozilla's Rhino to develop a little webapp. As one step, I need to get a webpage and filter all of it's nodes. For doing that, I use E4X. I thought I could do this like that:
var pnodes = doc..*(p);
But that produces an error. How is it done right?
(BTW: this is just a step for incr...
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 like:
/subfolder/subpage.html
What I would need to do is fixing them and setting there root, like t...
I need to delete some nodes from an XML variable and I want to keep the original intact.
So I pass the XML to a new variable and delete the nodes from that one but the original changes with it.
Is there a way to protect the XML from the original variable?
...
I am building an application using Action script 3 I am retrieving some XML from the web however the node names are mms:Image mms:Results etc my action script compiler is throwing an error becuase it is not expecting to see the semi colon in the node name. How to I access the nodes?
thanks
...
Hi, I have a problem with retrieving attribute values via E4x in javascript.
Suppose a list of XML nodes like the following as the XMLObject:
<node att1="value1" att2="value2" att3="value3" att4="value4">
<nodeChild><!CDATA[/* ... */]></nodeChild>
/* more node childs */
</node>
I properly accessed the nodes (in a loop) and i...
Suppose I have the following XML:
var foo:XML = <root><a>this is a <b>special</b> case</a></root>
Is there any way to detect the position of <b> relative to the contents of <a> without a custom subparser?
...
I am running a script running in Rhino, which creates an E4X object like this:
var s = <product id="123">
<name>Google Search</name>
<source>https://google.com</source>
</product>
I want to include such XML in a SOAP message. I am using Apache Axis 2 ServiceClient for creat...
Hi,
I'm searching a possibility to get an array of elements in E4X for an unknown tagname (like the DOMs getElementsByTagName) inside of a function.
My first thought was something like:
(function (doc, tag) {
return doc..[tag];
})
Is there any chance to do this?
...
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), ECMAScript, ECMA 5, E4X (JavaScript for Xml)and many others
From what I have read it seems that ...
Trying to use cdata to store css but chrome throws "Uncaught SyntaxError: Unexpected token <" for the first line below:
var default_style = <![CDATA[
.TTContent table td.Mission img { max-height: 15px;}
]]>.toXMLString();
Does anyone knows why?
P.s. the css is much longer in reality
Many thanks,
...
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 return one? I trace xml..Group.length() and it is 0, but the Group is definately in the x...
I'm using Rhino to generate XHTML but my urls are being encoded as in:
-http://www.example.com/test.html?a=b&c=d
becomes
-http://www.example.com/test.html?a=b&amp;c=d
Failing test case as follows:
public class E4XUrlTest extends TestCase {
public void testJavascript() throws Exception {
final Context context = ne...
Is there an XMLList equivalent to Array.indexOf?
For example -
var array:Array = ['one','two'];
trace(array.indexOf('two')); // returns 1, since it's at the second position
trace(array.indexOf('three')); // returns -1, since it isn't found
... right? but what if I've got this -
var xml:XML = <list><item>one</item><item>two</item><...
(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 server.
My problem is that the CollectionEvent listener
doesn't get fired and thus labels no...