* -------------------------------------------------------------------- *
* Kurzbeschreibung : Funktionen zum Umgang mit XML-Templates *
* -------------------------------------------------------------------- *
- * $Revision:: $ *
- * $Date:: $ *
- * $Tag:: 0.2.1-FINAL $ *
- * $Author:: $ *
- * -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2013 by Mailer Developer Team *
+ * Copyright (c) 2009 - 2016 by Mailer Developer Team *
* For more information visit: http://mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
// Parses the XML content
function parseXmlData ($content) {
- // Is there recode?
- if (!function_exists('recode')) {
- // No fallback ATM
- reportBug(__FUNCTION__, __LINE__, 'PHP extension recode is missing. Please install it.');
- } // END - if
-
// Convert HTML entities to UTF-8
- $content = recode('html..utf8', $content);
+ $decoded = decodeEntities($content);
// Create a new XML parser
$xmlParser = xml_parser_create();
xml_set_character_data_handler($xmlParser, 'xmlCharacterHandler');
// Now parse the XML tree
- if (!xml_parse($xmlParser, $content)) {
+ if (!xml_parse($xmlParser, $decoded)) {
// Error found in XML!
//* DEBUG: */ die('<pre>'.htmlentities($content).'</pre>');
reportBug(__FUNCTION__, __LINE__, 'Error found in XML. errorMessage=' . xml_error_string(xml_get_error_code($xmlParser)) . ', line=' . xml_get_current_line_number($xmlParser));