actionscript 3 - How I can read all nodes of external xml file? -


how can read nodes of xml file in 2 state: 1- if don't know name of nodes. 2- if l know name of nodes.

note: can load , see file, want methods make access each nodes. can function each node. thanks.

var txml:xml; var xmlloader:urlloader = new urlloader();     xmlloader.load(new urlrequest("‫‫ole.xml"));     xmlloader.addeventlistener(event.complete,loaded);<br/> function loaded(e:event):void     {   txml = new xml(xmlloader.data);         var childno:int; var namea: string; var sex:string;         var id:int;         namea= txml.@name; sex= txml.@sex;id = txml.@level;         childno= txml.@child;         trace(childno);         trace(namea);         trace(sex);         trace(id);         addmc(namea);} 

there few ways children.

child property return xmllist , let search child name

children gives children of specific node, no matter of names

descendants give nested ones (can searched name)

there might more, can @ documentation, these common ones.

http://help.adobe.com/en_us/flashplatform/reference/actionscript/3/xml.html


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -