Extract info from the DOMNode Object.
Parameters
object $dom: DOMNode Class.
Return value
array Key Value pair from the DOM Node.
1 call to advagg_validator_dom_extractor()
- advagg_validator_parse_soap_response_w3c in advagg_validator/
advagg_validator.inc - Parse an XML response from the validator.
File
-
advagg_validator/
advagg_validator.inc, line 253
Code
function advagg_validator_dom_extractor($dom) {
$node = $dom->firstChild;
$output = array();
do {
$text = trim($node->nodeValue);
if (!empty($text)) {
$key = str_replace('m:', '', $node->nodeName);
$output[$key] = $text;
}
} while ($node = $node->nextSibling);
return $output;
}