- var_dump: documentation ( source)
- simplexml_load_string: documentation ( source)
<?php
$x = <<<XML
<row>
<entry XY="1" al="23" se="5" ag="fgh"> </entry>
<entry XY="1" al="23" se="5" ag="fgh">Content1</entry>
<entry XY="1" al="23" se="5" ag="fgh">Content2</entry>
<entry XY="1" al="23" se="5" ag="fgh"> </entry>
<entry XY="1" al="23" se="5" ag="fgh">Content3</entry>
</row>
XML;
$xml = simplexml_load_string($x);
//$y = $xml->xpath("//entry[not(text()) and (text()!=' ')]");
$y = $xml->xpath("//entry[not(text())]");
var_dump($y);