比如说,我有一个包含100个“人”节点的XML文件,我想要前30个。或者可能是51 - 100.有没有办法用e4x语法来返回XMLList?
答案 0 :(得分:1)
var list:XMLList = xml.person;
var start:int = 10;
var end:int = 40;
var filteredList:XMLList = new XMLList();
for(i = start - 1; i < end; i++)
filteredList += new XML(XML(list[i]).toXMLString());