Changeset View
Changeset View
Standalone View
Standalone View
lib/AutodiscoverMicrosoft.php
Context not available. | |||||
// parse XML | // parse XML | ||||
try { | try { | ||||
$xml = new SimpleXMLElement($post); | $xml = new SimpleXMLElement($post); | ||||
Log::debug(print_r($xml, true)); | Log::debug(print_r($xml, true)); | ||||
foreach($xml->getDocNamespaces() as $strPrefix => $strNamespace) { | |||||
if(strlen($strPrefix)==0) { | |||||
$strPrefix="a"; //Assign an arbitrary namespace prefix. | |||||
} | |||||
$xml->registerXPathNamespace($strPrefix,$strNamespace); | |||||
} | |||||
foreach($xml->getDocNamespaces() as $strPrefix => $strNamespace) { | |||||
if(strlen($strPrefix)==0) { | |||||
$strPrefix="a"; //Assign an arbitrary namespace prefix. | |||||
} | |||||
$xml->registerXPathNamespace($strPrefix,$strNamespace); | |||||
} | |||||
if ($email = $xml->xpath('//a:EMailAddress')) { | if ($email = $xml->xpath('//a:EMailAddress')) { | ||||
$this->email = (string) array_shift($email); | $this->email = (string) array_shift($email); | ||||
Context not available. |