我有一个像这样的简单 xml:
<root Name="Bob" isImployed="true">
<customer Name="Bob" id="12345">was addressed in the shopping mall</customer>
<Job-title>Insurance</Job-title>
<experience>15</experience>
<Question1 question="how much do you make?">35000</Question1>
<Question2 question="do you get a yearly bonus?">5000</Question2>
<Question3 question="would you be interested in our weekly plan?">yes</Question3>
</root>
我创建了一个包含数据的 XMLList:
var mylist:XMLList;
我想复习一下所有的问题(不止 question1、question2 和 question3)。其中一些包含数字(薪水,奖金),而另一些则不包含。我正在寻找一种方法来查看整个列表,查询答案是否为数字,如果是,请获取数字。(并用它做一些计算)。我怎样才能做到这一点?
谢谢!