XPath VS CSS Selector

WP Intense Q & ACategory: Price Comparison ProXPath VS CSS Selector
ericleonardo asked 3 years ago

Hello! Please, can I use XPath address instead of CSS selector for some websites?

If not, please consider my suggestion: allow both XPath and CSS; put both fields or one field with a radio button (XPath/CSS).

So, the plugin would only use the preferred one for respective store. (Or any other better way)

I realize that some stores are trickier when dealing with CSS, but XPath are fine. Other are opposite.

Why not allow both and choose what works better?

Nice Chrome extension for finding/optimising Xpath: XPath Helper

Thanks!

Eric

Rakesh P. replied 12 months ago

Hi

Does this plugin now allow Xpath instead of css selector? I noticed on this page, you said it does not. However, on the product page, it says it is working with Xpath. Can you please confirm if this works with xpath or not so I can decide to purchase. Thanks

2 Answers
Vasil Yordanov answered 3 years ago

Hello Eric,

I do not think you can use Xpath at the moment, it works strictly with a CSS selector.

However, your idea is good and I will refer your request to Dave and the developer team as soon as possible.

I will follow up with you and keep you updated on this.

Kind regards!

Dave Hilditch Staff answered 11 months ago

Hi – in the plugin, you can use any of xPath, CSS or Regular Expressions to find the prices on the page. This is a per-website configuration.

We use cookies

We use cookies for various things on our site, including our on-site chat bubble (if you use it), our comment forms (if you use them) and for session handling (if you log in).

Other than that, we use cookies to identify where traffic came from to help us understand which traffic turns into sales, we use a cookie for Google Analytics traffic analysis and we use a cookie to customise adverts for our own products we think you'll be interested in.

You can read more detail in our privacy policy page. Please click 'Accept' or 'Decline' to continue.