XPath for less than or equal to a percentage?

时间:2016-04-15 14:54:16

标签: xml wordpress xpath wordpress-plugin

I'm using this code right now (XPath) with WP All Import for Wordpress to import large CSV files.

Here is the plugin doc:

http://www.wpallimport.com/documentation/advanced/filtering-with-xpath/

/node[price[1] < old_price]

But I want that price is only 80% or less of old_price. How can I code this? Is there a simple code, or I have to write a large new code?

1 个答案:

答案 0 :(得分:1)

XPath:

/node[price[1] &lt;= 0.8*old_price]