Remove XML Node using java parser

前端 未结 4 1078
迷失自我
迷失自我 2020-12-02 21:41

In the below sample XML, how to remove Entire B Node if E=13 using java parser.


   
     
       
         11         


        
4条回答
  •  悲&欢浪女
    2020-12-02 22:16

    I tried this example of file with the Blaise code and I get

    Exception in thread "main" java.lang.NullPointerException
        at myxml.xmlParty2.main(xmlParty2.java:22)
    

    This is the file

    
    
        
            
                wf2333
                desc_title_5
                2
                Impossible de joindre Cliquez sur le lien ci-dessous pour effectuer une nouvelle tentative.
            
            
                desc_wf_1_etat_1
                desc_wf_1_etat_2
            
        
    
        
            
                wf2334
                desc_title_5
                2
                Impossible de joindre Cliquez sur le lien ci-dessous pour effectuer une nouvelle tentative.
            
            
                desc_wf_1_etat_1
                desc_wf_1_etat_2
            
        
    
    
    

    and the Xptah Query is XPathExpression expression = xpath.compile("/favoris/workflow[@id='wf2333']");

提交回复
热议问题