jvs37 Posted March 31, 2011 Share Posted March 31, 2011 Hi all, I am pretty new to php and I am having an issue trying to load an XML document. When ever I try to use Xpath it negates all the code below the line, including the HTML, and returns a white page. here is my code: <html> <head> <?php $xpath = new DOMXPath("structure.xml"); ?> <body> hello world </body> </html> I checked phpinfo() and I have both the DOM and XPath enables and installed. I have also tried using just DOM and that worked so it is only Xpath that is not working. Ideas? Thank you James S Link to comment https://forums.phpfreaks.com/topic/232300-xpath-and-domdocument-help/ Share on other sites More sharing options...
betterphp Posted March 31, 2011 Share Posted March 31, 2011 turn on error reporting and see what the reason for the failure is You can do this by setting error_reporting to E_ALL and siaply_errors to On in php.ini or using this code ini_set('display_errors', true); error_reporting(E_ALL); Link to comment https://forums.phpfreaks.com/topic/232300-xpath-and-domdocument-help/#findComment-1194996 Share on other sites More sharing options...
jvs37 Posted March 31, 2011 Author Share Posted March 31, 2011 Thank you, seeing the error I was able to solve the issue, thank you! Link to comment https://forums.phpfreaks.com/topic/232300-xpath-and-domdocument-help/#findComment-1195107 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.