Jump to content

Check if xPath is correct


progcod

Recommended Posts

If the XPath method (like SimpleXMLElement::xpath or DOMXPath::query) doesn't issue warnings in case of a syntax error, you can just run it and see if it works. Doesn't even have to match anything.

 

Otherwise... probably need regular expressions, but one that would validate an XPath query would be insane. If you can restrict the query to a limited set of features then that'd help.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.