惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

aimingoo的专栏
aimingoo的专栏
S
Securelist
博客园 - Franky
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
IT之家
IT之家
GbyAI
GbyAI
Microsoft Azure Blog
Microsoft Azure Blog
The Cloudflare Blog
云风的 BLOG
云风的 BLOG
N
News and Events Feed by Topic
AI
AI
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Schneier on Security
Schneier on Security
Attack and Defense Labs
Attack and Defense Labs
Vercel News
Vercel News
腾讯CDC
Google DeepMind News
Google DeepMind News
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
M
MIT News - Artificial intelligence
WordPress大学
WordPress大学
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
N
Netflix TechBlog - Medium
量子位
S
Schneier on Security
Hacker News: Ask HN
Hacker News: Ask HN
Cyberwarzone
Cyberwarzone
S
Security Affairs
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
N
News and Events Feed by Topic
T
Tenable Blog
PCI Perspectives
PCI Perspectives
MyScale Blog
MyScale Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Cyber Attacks, Cyber Crime and Cyber Security
W
WeLiveSecurity
N
News | PayPal Newsroom
P
Proofpoint News Feed
O
OpenAI News
C
CERT Recently Published Vulnerability Notes
B
Blog
Cisco Talos Blog
Cisco Talos Blog
Microsoft Security Blog
Microsoft Security Blog
V
Visual Studio Blog
MongoDB | Blog
MongoDB | Blog
大猫的无限游戏
大猫的无限游戏
A
Arctic Wolf
Y
Y Combinator Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Spread Privacy
Spread Privacy

博客园 - netlynx2000

flex TabContainer 类实例化问题 一个追风筝的人,追寻着什么 flex加载Module遇到的问题 Action script如何复制一个Bitmap对象 如何一个Loader加载多个资源 Flex- 将Sprite控件添加到FLEX UI中 ex metadata tag 自定义flex中的事件 从EAI到SOA OMG工作流规范翻译 男人,信仰,爱,恨,人性 开源产品公司如何生存 拔拔草,开源与闭源 其实现在的我们也有很多梦想,比如低谷时想未来做一个什么样的公司,未来买什么样的豪宅。但是仅限于自我满足的想想,然后继续平庸的生活。 做事情的好习惯 使用Ajax读取aspx页面源代码 挣钱,买个照相机 友情提示的一个问题 苍天开眼,刘青云终于获奖了
flex如何删除一个XML Node
netlynx2000 · 2008-03-18 · via 博客园 - netlynx2000

这几天在用flex做流程设计器时,遇到了需要删除XMl节点的问题,在网上搜了一下,有一种方案是将整个XML树重新构造一遍,在构造时将要删除的节点排除。这种方法对于流程设计器代价太高。无奈之下只好忍着头痛去Adobe的网站上看看E文去,终于黄天不负有心人,终于找到了,实例代码如下,下面的代码我测试过,可以正确运行

Title

<?xml version="1.0" encoding="utf-8"?>
<mx:Application
    xmlns:mx="http://www.adobe.com/2006/mxml"
    width="440" height="400"   
    initialize="initializeHandler();"
>

    <mx:Script>
        <![CDATA[
       
            [Bindable] public var a:XMLList;
            [Bindable] public var b:XMLList;
            [Bindable] public var c:XMLList;
            [Bindable] public var d:XMLList;

            // Model: XML structure describing
            // some of the books in my collection.   
            [Bindable]
            private var myBooks:XML =
                <books>

                    <book ISBN="1590595181">
                        <title>Foundation ActionScript Animation: Making Things Move</title>
                        <author>Keith Peters</author>

                        <amazonUrl>http://tinyurl.com/npuxt</amazonUrl>
                        <pageCount>470</pageCount>
                    </book>

                    <book ISBN="1582346194">
                        <title>Send in the Idiots: Stories from the Other Side of Autism</title>

                        <author>Kamran Nazeer</author>
                        <amazonUrl>http://tinyurl.com/lo5ts</amazonUrl>
                        <pageCount>500</pageCount>

                    </book>
                </books>
           
            private function initializeHandler():void

            {
                // An XML list that contains both book nodes.               
                a = myBooks.book; 
               
                // Keith Peters        
                b = myBooks.book[0].author;
               
                // 470

                c = myBooks.book.(@ISBN=="1590595181").pageCount;

                // Delete the first book node.
                delete myBooks.book[0];
               
                // Send in the Idiots...
                d = myBooks.book[0].title;
            }
        ]]>
    </mx:Script>

   
    <!-- User interface -->
    <mx:Panel
        title="XML lookup results"
        paddingBottom="10" paddingLeft="10" paddingRight="10" paddingTop="10">

        <mx:Text text="{'a: ' + a}" width="300"/>
        <mx:Label text="{'b: ' + b}"/>       
        <mx:Label text="{'c: ' + c}"/>

        <mx:Label text="{'d: ' + d}"/>
    </mx:Panel>

</mx:Application>