Total downloads: 21943
Category: Component
File last revision: 16, Mar 2007 01:03:46
License: LGPL
Flash MX 2004 Class:
This class allow you to tranform every kind of XML file into a Native AS Object. Inside the .zip there is also an example on how to use it
(Updated to work with Flash8)
Flash content
Comments (125)
hey chris,
that's exaclty the problem i'm having.
This class corrupts Japanese characters in XML files! Where can I find an older version of this class that handles asian characters correctly?
Office webiste http://www.uggol.com
rrr
I have a problem i instaled a XML2Object buth when I use:
import it.sephiroth.XML2Object;
compiler trows:
1172: Definition it.sephiroth:XML2Object could not be found.
that is great posting
i don't quite understand. can anyone be so kind to explain it to me?
thanks . useful information.
the problem with the code here is if there is only one node there will not be generated an array but an object
if you have a xml like this:
<xml>
<config>
<setting name=x>100</setting> <setting name=y>100</setting> <setting name=rotation>90</setting> <setting name=alpha>100</setting> </config></xml>
the access to the data is like this:
xml2obj.xml.config.setting[0].dataxml2obj.xml.config.setting[1].dataxml2obj.xml.config.setting[2].dataxml2obj.xml.config.setting[3].data
but if there is only 1 setting item like this:
<xml> <config> <setting name=x>100</setting>
</config>
</xml>
then the access is not as you probably would anticipate
xml2obj.xml.config.setting[0].data
but
xml2obj.xml.config.setting.data
if a node in a xml has no siblings with same name it is NOT defined as an array. it will be defined as an object, like xml or config in this example.
so you have to change the xml2object class to allways define a array for every node. then the access would be like
xml2obj.xml[0].config[0].setting[0].data
OR
you have to check if xml2obj.xml.config.setting.length is undefined AND xml2obj.xml.config.setting NOT undefined to access with
xml2obj.xml.config.setting.data
for the case there is only 1 item. for all cases where > 1 item appears in the xml you go as usual with
xml2obj.xml.config.setting[0].data
i hope this helps
Ugg-- http://www.uggbootsvip.com
ugg boots-- http://www.ugg-mall.com,
cheap ugg boots-- http://www.ugg-mall.com,
ugg cardy-- http://www.ugg-mall.com
cheap ugg cardy boots-- http://www.ugg-mall.com
ugg classic cardy-- http://www.ugg-mall.com/ugg-classic-cardy-boots.html
cardy ugg boots-- http://www.ugg-mall.com/ugg-classic-cardy-boots.html
ugg classic cardy boots-- http://www.ugg-mall.com/ugg-classic-cardy-boots.html
ugg classic tall-- http://www.ugg-mall.com/ugg-classic-tall-boots.html
ugg boots uk-- http://www.ugg-mall.com/ugg-classic-short-boots.html
hydraulic tools-- http://www.tpttools.com
PVC pipe fittings-- http://www.z-plast.com/product_3_2.htm
PVC window-- http://www.z-plast.com
wow gold-- http://www.wowgold-shopping.com
