看看下面的代码你就明白了 var testXml:XMLList = new XMLList( < sectiongroup >< a >< section name = " test " /></ a ></ sectiongroup > ); var a:XMLList = testXml[ " a " ];trace(a); var section:XMLList = a[ " section " ];trace(section); 结果 Node A: < a > < section name = " test " /> </ a > Node section: ^_^,奇怪吧,怎么section node没有被上,其实section node是选上的,不要被XML的toString方法给迷惑了。 XML的toString当其有子节点时,它会显示其节点本身,当其没有子节点,只有值的时候,就只会显示值,不会显示其本身。 这理的section节点其没有子节点,只有空值,所以toString就为空字符串. 转载于:https://www.cnblogs.com/tionase/archive/2007/02/26/656894.html