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 Quote Link to comment 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); Quote Link to comment 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! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.