Loading XML into php giving error
I am trying to load xml in php
$doc = new DOMDocument();
$doc->load("LoginVal.xml");
I am getting an error like
Warning: domdocument :: domdocument () expects at least 1 parameter, 0 is set in C: \ Program Files \ Apache Group \ Apache2 \ htdocs \ hello.php on line 5
Fatal error: Call to undefined domdocument :: load () method in C: \ Program Files \ Apache Group \ Apache2 \ htdocs \ hello.php on line 7
Regards, Hemant
source to share
The fatal error is that the object was created, the warning is as it says it is pending parameter validation http://us3.php.net/manual/en/domdocument.construct.php
source to share
Please read the user's comments in DOMDocument::__construct()
. This error says that when using PHP5 on Windows machines (which is most likely your configuration). I am quoting Christian reinecke dot in web dot de :
[...] make sure you don't overwrite this dom library with another one (fe extension = php_domxml.dll in php.ini). XAMPP fe delivers its standard version with php_domxml.dll which ends in this error message
Make sure php.ini
no php_domxml.dll
-extension exists .
source to share