function l10n_update_xml_parser::parse in Localization update 6
Same name and namespace in other branches
- 7 l10n_update.parser.inc \l10n_update_xml_parser::parse()
Parse an XML data file.
It can contain information for one or more l10n_servers
Example data, http://ftp.drupal.org/files/translations/l10n_server.xml
File
- ./
l10n_update.parser.inc, line 70 - Extends the update parser to work with releases
Class
- l10n_update_xml_parser
- Parser for server metadata
Code
function parse($data) {
$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, $data);
xml_parser_free($parser);
//return $this->servers;
return $this->current_server;
}