Sample Code:
$xml = "";print_r(parseXML($xml,array('email','pass')));function parseXML($xml,$tagNames){$xmlDoc = new DOMDocument();$xmlDoc->loadXML($xml);$root = $xmlDoc->documentElement;$results = array();foreach($tagNames as $tagName){$elements = $root->getElementsByTagName($tagName);$value = $elements->item(0)->nodeValue;$temp = array($tagName=>$value);$results = array_merge($results,$temp);}return $results;} 787887347@qq.com dGVzdDEyMzQ1Ng==