有一个XML属性破折号,我不知道如何对其进行过滤: 在这里你可以看到XML的一个简单的例子:ActionScript3:过滤包含破折号的xml属性?
<posts>
<post>
<photo-url max-width="1280">http://blabla.tumblr.com/photo/98</photo-url>
</post>
</posts>
因为也可在照片的URL标记有一个破折号,我需要解析它...孩子(“照片网址”)。 这工作得很好,但如果我想过滤这些标签(照片网址),为了接收所有照片网址的相同属性:“max-widht ='1280'”,我无法做到这一点。 我尝试这样的做法:
var photoUrl:XMLList = xml.posts.post.child("photo-url").(@max-width==1280);
我得到这个错误:
ReferenceError: Error #1065: Variable @max is not defined.
THX