E4X in ActionScript help needed
Posted
by
voipsecuritydigest.com
on Stack Overflow
See other posts from Stack Overflow
or by voipsecuritydigest.com
Published on 2010-12-30T22:05:02Z
Indexed on
2011/01/03
7:53 UTC
Read the original article
Hit count: 304
Xml
|actionscript
Here is the XML
How using E4X read values of nodes
<status>??</status>
and of node
<invisible value="false"/>
?
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" creationComplete="init()">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<fx:Script>
<![CDATA[
var xml:XML =
<iq type="result" id="ss-1">
<query status-min-ver="1" status-max="512" status-list-contents-max="5" status-list-max="3" xmlns="google:shared-status">
<status>
??
</status>
<show>
default
</show>
<status-list show="default">
<status>
??
</status>
<status>
?
</status>
<status>
??
</status>
</status-list>
<status-list show="dnd">
<status>
??
</status>
<status>
dnd, i have bad mood
</status>
<status>
showering
</status>
<status>
??_???¦
</status>
<status>
?
</status>
</status-list>
<invisible value="false"/>
</query>
</iq>
public function init() {
trace(xml.query.invisible.@value);
}
]]>
</fx:Script>
</s:Application>
© Stack Overflow or respective owner