문제

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?

도움이 되었습니까?

해결책

How about this way :

//PRODUCT[BRAND != 'Silly Games']
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top