AS3 Deep XML Parsing
How to efficiently parse the following XML file in short ActionScript3 into a class such as:
class bbbbbbbb {
var level2_1:String;
var level2_2:Array;
var level2_3:Array;
var level3_1:Array;
}
This is the XML file:
<root>
<level1>
<level2_1>Content开发者_高级运维</level2_1>
<level2_2>
<level3>Content1</level3>
<level3>Content2</level3>
<level3>Content3</level3>
<level3>Content4</level3>
<level3>Content5</level3>
<level3_1>
<level4>Content1</level4>
<level4>Content2</level4>
<level4>Content3</level4>
<level4>Content4</level4>
</level3_1>
</level2_2>
<level2_3>Content</level2_3>
</level1>
<level1>
<level2_1>Content</level2_1>
<level2_2>
<level3>Content1</level3>
<level3>Content2</level3>
<level3>Content3</level3>
<level3>Content4</level3>
<level3>Content5</level3>
<level3_1>
<level4>Content1</level4>
<level4>Content2</level4>
<level4>Content3</level4>
<level4>Content4</level4>
</level3_1>
</level2_2>
<level2_3>Content</level2_3>
</level1>
<level1>
<level2_1>Content</level2_1>
<level2_2>
<level3>Content1</level3>
<level3>Content2</level3>
<level3>Content3</level3>
<level3>Content4</level3>
<level3>Content5</level3>
<level3_1>
<level4>Content1</level4>
<level4>Content2</level4>
<level4>Content3</level4>
<level4>Content4</level4>
</level3_1>
</level2_2>
<level2_3>Content</level2_3>
</level1>
</root>
精彩评论