如何以编程方式完全删除 Flex 中的属性?

发布于 2024-12-11 16:56:42 字数 197 浏览 4 评论 0原文

我正在尝试 e4x。我可以通过执行以下操作以编程方式向 Xml 添加属性:

xml.@name = 'jerry';

现在我以编程方式向其添加了一个 name 属性,因为即使 xml 没有名为 name 的属性,在上面的语句之后,它现在自动拥有一个属性。 我现在的困难是我如何再次删除以编程方式插入的名称属性?

I am experimenting with e4x. I could programmatically add an attribute to an Xml by doing something like this :

xml.@name = 'jerry';

now i have added a name attribute to it programmatically because even though the xml had no attribute called name, after the statement above, it automatically has one now.
My difficulty now is how do i , as well, remove the name attribute i have inserted programmatically again?

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

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

发布评论

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

评论(1

指尖上的星空 2024-12-18 16:56:42

使用以下运算符:

delete xml.@name;

Use following operator:

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