/** * Further processes the data from xml2php into a more * useful array structure. * * @author Matt McNaney <mcnaney at gmail dot com> */ public static function _orderXML(&$arr_vals) { if (empty($arr_vals)) { return null; } while (@($xml_val = array_shift($arr_vals))) { $value = null; extract($xml_val); if ($type == 'close') { return $new_val; } elseif ($type == 'cdata') { continue; } elseif ($type == 'complete') { $insert = array('tag' => $tag, 'value' => $value); } else { $insert = array('tag' => $tag, 'value' => PHPWS_Text::_orderXML($arr_vals)); } $new_val[] = $insert; } return $new_val; }