XPath expression to select all XML child nodes except a specific list?

前端 未结 2 1928
挽巷
挽巷 2020-12-05 10:50

Here\'s the sample data:


    
        Empire Burlesque
        Bob Dylan
           


        
2条回答
  •  悲哀的现实
    2020-12-05 11:24

    I'd start experimenting with something like

    "//cd/*[(name() != 'price') and (name() != 'year')]"
    

    Or you just do normal recursive template matching with , and then have empty templates for and elements:

    
    
    

提交回复
热议问题