I'm a beginner with XML on PHP. My page returns me the following PHP error:
But, at line 2, there only is a "require_once", followed by 3 others "require_once", the path to the required file is ok, and it ends with a ';'. The line above is the "
I have this sample of code, which I think is the source of this error (in this order)
$xml = simplexml_load_string("<result/>");
$entitlements = $xml->addChild("entitlements");
$entitlements->addChild("productId", $productId);
then, below :
$fulfillmentXML = new SimpleXMLElement($result);
//some stuff with $fullfillmentXML
echo $xml->asXML();
I do not understand exactly how the XML works in PHP, but I thought there was a problem creating a SimpleXMLElement() after the simplexml_load_string() call.