XMD class, very easy to use. Prepare the next qq. xml (one example used in my teaching) QQ my friend sonygod important materials account = "54022626" nickname = "rockVsTone" remarks = "sonygod" age = "25" gender = "male" country region = "Chinese National Republic" state
XMD class, very easy to use.
First prepare the next qq. xml (one example I used in teaching)
<我的好友>
<重要材料 帐号="54022626" 昵称="rockVsTone" 备注="sonygod" 年纪="25" 性别="男" 国家地区="中华国民共和国" 州省="广东省" 城市="广州" 个性签名="五一,远方的人你是否回来?" />
<具体材料 生肖="狗" 职业="盘算机业" 星座="水瓶座" 血型="其它" 电子邮件="54022626@qq.com" 接洽地址="87908332" />
<先容阐明 个人阐明="这家伙很懒。" />
<重要材料 帐号="54022626" 昵称="rockVsTone" 备注="sonygod" 年纪="25" 性别="男" 国家地区="中华国民共和国" 州省="广东省" 城市="广州" 个性签名="五一,远方的人你是否回来?" />
<具体材料 生肖="狗" 职业="盘算机业" 星座="水瓶座" 血型="其它" 电子邮件="54022626@qq.com" 接洽地址="87908332" />
<先容阐明 个人阐明="这家伙很懒。" />
<陌生人>
<黑名单>
New fla
Write at Layer 3
Var myxmd: XMD = new XMD ();
LoadData ('qq. XML ');
Function loadData (p: String ){
Myxmd. removeEventListener ('onxmdload', myListener );
Myxmd = new XMD ();
Myxmd. addEventListener ('onxmdload', myListener );
Myxmd. load (p );
}
Write at Layer 3
Var temp: Array = [];
Var myListener: Object = new Object ();
MyListener. onXMDLoad = function (evtObj: Object ){
Trace ('onxmdload success: 'evtobj. success );
For (var I in evtObj.tar get. data ){
Trace ('-------------------- I' I '--------------------');
Temp.push(evtObj.tar get. data [I]);
For (var j in evtObj.tar get. data [I]) {
Trace ('============================ j 'J' ======================== ======= ');
For (var k in evtObj.tar get. data [I] [j]) {
Trace ('-------------------- k' k );
For (var p in evtObj.tar get. data [I] [j] [k]) {
Trace ('['P']' evtObj.tar get. data [I] [j] [k] [p]);
}
}
}
}
};
You can open the debug panel to view the hierarchical relationship. xmd has proactively analyzed the complete
You will see the following consequences in the output panel:
*--------------------------------------------------------
OnXMDLoad success: true
-------------------- I blacklist --------------------
------------------ I stranger --------------------
------------------ I my friend --------------------
========================== Jlhm ========================= =
-------------------- K content clarification
[Personally] this guy is lazy.
-------------------- K specific materials
[Contact URL] 87908332
[Email] 54022626@qq.com
[Blood type] Others
[Constellation] Aquarius
[Occupation] computer industry
[Chinese zodiac] dog
-------------------- K important materials
[Personalized signature] May 1. are you from afar back?
[City] Guangzhou
[State province] Guangdong province
[Countries and regions] the People's Republic of China
[Gender] Male
[Age] 25
[Remarks] sonygod
[Nickname] rockVsTone
[Account] 54022626
========================== Jsonygod ========================== =
-------------------- K content clarification
[Personally] this guy is lazy.
-------------------- K specific materials
[Contact URL] 87908332
[Email] 54022626@qq.com
[Blood type] Others
[Constellation] Aquarius
[Occupation] computer industry
[Chinese zodiac] dog
-------------------- K important materials
[Personalized signature] May 1. are you from afar back?
[City] Guangzhou
[State province] Guangdong province
[Countries and regions] the People's Republic of China
[Gender] Male
[Age] 25
[Remarks] sonygod
[Nickname] rockVsTone
[Account] 54022626
Done!