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?

War es hilfreich?

Lösung

How about this way :

//PRODUCT[BRAND != 'Silly Games']
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top