xPath expression validation

I need some help to understand the validation of xPath expression in PHP. I want to validate if a xPath expression is correct before i pass it to DOMXPath::query.

Sponsor our Newsletter | Privacy Policy | Terms of Service