阅读背景:

通过XSLT使用if-else条件简化xml节点

来源:互联网 

This is the input file:

这是输入文件:

<root> 
        <node id="N1">
            <fruit id="small_fruit" action="create">
                <orange id="1" action="create">
                    <attribute>
                        <color>yellow</color>
                    </attribute>
                </orange>
            </fruit>

            <fruit id="small_fruit" action="create">
                <orange id="1" action="destroy">
                    <attribute>
                        <color>green</color>
                    </attribute>
                </orange>
            </fruit>            
        </node>

        <node id="N2">
            <dog id="small_dog">    
                <poodle id="1" action="create">
                    <attribute>
                        <color>Yellow</color>    
                    </attribute>
                </poodle>       

                <terrier id="2" action="create">
                    <attribute>
                        <color>White</color>    
                    </attribute>
                </terrier>

                <poodle id="1" action="change">
                    <attribute>
                        <color>Brown</color>        
                    </attribute>
                </poodle>

                <terrier id="2" action="destroy">
                    <attribute>
                        <color>Blue</color>    
                    </attribute>
                </terrier>
            </dog>

            <dog id="small_dog" action="create">               
                <poodle id="1" action="destroy">
                    <attribute>
                        <color>Black</color>        
                    </attribute>
                </poodle>

                <terrier id="2" action="change">
                    <attribute>
                        <color>White</color>        
                    </attribute>
                </terrier>
                <terrier id="2" action="change">
                    <attribute>
                        <color>Grey</color>        
                    </attribute>
                </terrier>
            </dog>

            <dog id="large_dog">                
                <poodle id="1" action="create">
                    <attribute>
                        <color>Red</color>
                    </attribute>
                </poodle>
            </dog>
        </node>
    </root>
<root> 
   



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: