E4X in ActionScript help needed
- by voipsecuritydigest.com
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>