function ARC_erdf_parser::parse_data in Taxonomy import/export via XML 6.2
Same name and namespace in other branches
- 5.2 arc/ARC_erdf_parser.php \ARC_erdf_parser::parse_data()
- 5 arc/ARC_erdf_parser.php \ARC_erdf_parser::parse_data()
- 6 arc/ARC_erdf_parser.php \ARC_erdf_parser::parse_data()
File
- arc/
ARC_erdf_parser.php, line 295
Class
Code
function parse_data($data) {
$this
->init(false);
$this->encoding = $this->encoding == "auto" ? "UTF-8" : $this->encoding;
$this
->create_parser();
if ($this->save_data) {
$this->data = $data;
}
if (!($success = xml_parse($this->parser, $data, true))) {
$error_str = xml_error_string(xml_get_error_code($this->parser));
$line = xml_get_current_line_number($this->parser);
xml_parser_free($this->parser);
return "XML error: '" . $error_str . "' at line " . $line . "\n";
}
$this->target_encoding = xml_parser_get_option($this->parser, XML_OPTION_TARGET_ENCODING);
xml_parser_free($this->parser);
return $this
->done();
}