Flash 中的动态 xml 读取

发布于 2024-07-29 11:20:44 字数 447 浏览 5 评论 0原文

我想读取从 php 脚本返回的 flash 中的 xml 文件。 我对所有内容进行了排序,除了

每一行中返回的属性有所不同(从 1 到 100 的任何属性)。

下面是解释我的意思的代码,

for(var ii:int = 0; ii < tempXML.record.length(); ii++)
{
  for(var b:int = 0; b < numAttributes; b++)
  {
     //what i am aiming for here is the ability to have @"arr"+ a number here
     trace(tempXML.record[ii].@arr+numAttributes);
  }         
}

希望你能明白我的意思。 任何帮助表示赞赏 干杯 标记

i want to read an xml file in flash that is returned from a php script. i have it all sorted apart from one thing

the attributes that are returned in each row vary (anything from 1 to 100).

below is the code to explain what i mean

for(var ii:int = 0; ii < tempXML.record.length(); ii++)
{
  for(var b:int = 0; b < numAttributes; b++)
  {
     //what i am aiming for here is the ability to have @"arr"+ a number here
     trace(tempXML.record[ii].@arr+numAttributes);
  }         
}

hopfully you can see what i am getting at. any help apprechiated
Cheers
Mark

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

骄兵必败 2024-08-05 11:20:44

我设法让它工作发现了 attribute() 并对它进行了排序,因此下面的内容很好地满足了我的

for(var ii:int = 0; ii < tempXML.record.length(); ii++)
{
   for(var b:int = 0; b < numRows; b++)
   {
      trace(tempXML.record[ii].attributes()[b].name());
   }            
}

需求
标记

i managed to get it working discovered attributes() and that sorted it so the below worked well for my needs

for(var ii:int = 0; ii < tempXML.record.length(); ii++)
{
   for(var b:int = 0; b < numRows; b++)
   {
      trace(tempXML.record[ii].attributes()[b].name());
   }            
}

Regards
Mark

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文