How about this way :
//PRODUCT[BRAND != 'Silly Games']
Frage
I am importing products into an online store from an XML document. There is the option to filter using xpath.
I would like to exclude certain products based on brand.
I have:
<PRODUCT ITEM="12797">
<BRAND>Boxer Games</BRAND>
<INCATNAME>Hen And Stag Nights</INCATNAME>
</PRODUCT>
<PRODUCT ITEM="12798">
<BRAND>Silly Games</BRAND>
<INCATNAME>Hen And Stag Nights</INCATNAME>
</PRODUCT>
I understand I can use "/product[brand=silly games]" to select the node, but how can I then skip/ignore it?
Lösung
How about this way :
//PRODUCT[BRAND != 'Silly Games']