I am parsing html using domxpath in php, and extracting description out of the webpage. But the problem I am facing is that its case sensitive and giving an error if anything is written in different case. here is my code:
$d=new DOMDocument();
$d->loadHTML($source);
$domx = new DOMXPath($d);
$description=$domx->query("//meta[@name='description']")->item(0)->getAttribute('content');
its working fine when everything is in lower case, but gives error if anything is written in any other case. Is there any flag or something which can make domxpath case insensitive.