function update_xml_parser::parse in Drupal 6
Parse an array of XML data files.
File
- modules/
update/ update.fetch.inc, line 194 - Code required only when fetching information about available updates.
Class
- update_xml_parser
- XML Parser object to read Drupal's release history info files. This uses PHP4's lame XML parsing, but it works.
Code
function parse($data) {
foreach ($data as $datum) {
$parser = xml_parser_create();
xml_set_object($parser, $this);
xml_set_element_handler($parser, 'start', 'end');
xml_set_character_data_handler($parser, "data");
xml_parse($parser, $datum);
xml_parser_free($parser);
}
return $this->projects;
}