在 AS3 中使用 E4X 在 XML 节点中创建新属性
有什么办法可以做到吗?
Is there any way to do it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
有什么办法可以做到吗?
Is there any way to do it?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(5)
谢谢回答。
我确实发现您的解释和链接建议有趣且令人鼓舞。
无论如何,我没有把我的问题说清楚。 我确实想知道的是如何创建任何属性,即使不知道它的名称。 我确实阅读了一些文档和教程,直到我弄清楚为止。 希望这能有所帮助。
Thanks for answering.
I did found your explanations and link suggestions interesting and encouraging.
Anyway, I did not make myself clear with my question. What I did want to know was how to create any property, even without knowing it's name. I did read several docs and tutorials until I figured it out. Hope this can be of help.
要添加属性,您需要写为
希望它有效。
谢谢
阿米特
To add attribute you need to write as
Hope it works.
Thx
Amitd
长答案:请阅读文档。 确实是非常丰富了。 整章都专门讨论 XML 和 E4X。 这里的链接可能会有所帮助给你。
简短回答:是的。
Long answer: Please do read the documentation. It is indeed very rich. Entire chapters have been devoted to XML and E4X. Here's a link that may be helpful to you.
Short answer: Yes.
dirkgently 没有直接告诉你怎么做,我想是出于教育目的。 尽管如此,方法如下:
Tada! 但是拜托,RTFM。
dirkgently didn't directly tell you how to do it, I guess with an educational purpose. Nonetheless, here's how:
Tada! But please, RTFM.
xmlNode.attributes['属性'] = '属性值';
xmlNode.attributes['attribute'] = 'attribute value';