Parse Data
Script: |
function parse_data($data) {
if ($data) {
$p = xml_parser_create();
xml_parser_set_option($p, XML_OPTION_CASE_FOLDING, 0);
xml_parser_set_option($p, XML_OPTION_SKIP_WHITE, 0);
xml_parse_into_struct($p, $data, &$vals, &$index);
xml_parser_free($p);
$count = count($vals);
for($z = 0; $z < $count; $z++) {
if (isset($vals[$z]["value"])) {
$vals[$z]["value"] = $vals[$z]["value"];
}
}
return XML::set_xml_to_array($vals, $i);
}
return array();
}
|
|