the xml i am recieving looks like:
<?xml version="1.0" encoding="utf-8"?>
<ChangePassPhraseRequestResponse
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="www.envmgr.com/LabelService">
<Status>2012</Status>
<ErrorMessage>Account Error encountered (Log ID: 11845)</ErrorMessage>
</ChangePassPhraseRequestResponse>
i am attempting to encode to json as such (where xml = above response)
$data = simplexml_load_string($xml);
echo json_encode($data);
error i am getting is:
simplexml_load_string(): namespace warning : xmlns: URI www.envmgr.com/LabelService is not absolute
SimpleXMLElement::__construct(): Entity: line 4: parser error : Start tag expected, '<' not found