Jump to content

XPath and DOMDocument help


jvs37

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.