72 if(!file_exists($filename))
79 return $oXmlParser->parse($buff);
100 $this->input = str_replace(array(
'',
''), array(
'',
''), $this->input);
103 preg_match_all(
"/xml:lang=\"([^\"].+)\"/i", $this->input, $matches);
106 if(count($matches[1]) && $supported_lang = array_unique($matches[1]))
108 $tmpLangList = array_flip($supported_lang);
110 if(!isset($tmpLangList[$this->lang]))
112 if(isset($tmpLangList[
'en']))
118 $this->lang = array_shift($supported_lang);
128 $this->oParser = xml_parser_create(
'UTF-8');
130 xml_set_object($this->oParser, $this);
131 xml_set_element_handler($this->oParser,
"_tagOpen",
"_tagClosed");
132 xml_set_character_data_handler($this->oParser,
"_tagBody");
134 xml_parse($this->oParser, $this->input);
135 xml_parser_free($this->oParser);
137 if(!count($this->output))
142 $output = array_shift($this->output);
162 $obj->node_name = strtolower($node_name);
165 $this->output[] =
$obj;
178 $this->output[count($this->output) - 1]->body .= $body;
189 $node_name = strtolower($node_name);
190 $cur_obj = array_pop($this->output);
191 $parent_obj = &$this->output[count($this->output) - 1];
192 if($this->lang && $cur_obj->attrs->{
'xml:lang'} && $cur_obj->attrs->{
'xml:lang'} !=
$this->lang)
196 if($this->lang && $parent_obj->{$node_name}->attrs->{
'xml:lang'} && $parent_obj->{$node_name}->attrs->{
'xml:lang'} !=
$this->lang)
201 if(isset($parent_obj->{$node_name}))
203 $tmp_obj = $parent_obj->{$node_name};
204 if(is_array($tmp_obj))
206 $parent_obj->{$node_name}[] = $cur_obj;
210 $parent_obj->{$node_name} = array($tmp_obj, $cur_obj);
215 if(!is_object($parent_obj))
217 $parent_obj = (object) $parent_obj;
220 $parent_obj->{$node_name} = $cur_obj;
232 foreach($arr as $key => $val)
234 $key = strtolower($key);
if(file_exists(_XE_PATH_. 'config/config.user.inc.php')) if(!defined('__DEBUG__')) if(!defined('__DEBUG_OUTPUT__')) if(!defined('__DEBUG_PROTECT__')) if(!defined('__DEBUG_PROTECT_IP__')) if(!defined('__DEBUG_DB_OUTPUT__')) if(!defined('__LOG_SLOW_QUERY__')) if(!defined('__LOG_SLOW_TRIGGER__')) if(!defined('__LOG_SLOW_ADDON__')) if(!defined('__LOG_SLOW_WIDGET__')) if(!defined('__DEBUG_QUERY__')) if(!defined('__OB_GZHANDLER_ENABLE__')) if(!defined('__ENABLE_PHPUNIT_TEST__')) if(!defined('__PROXY_SERVER__')) if(!defined('__ERROR_LOG__')) if(!defined('__DISABLE_DEFAULT_CSS__')) if(!defined('__AUTO_OPCACHE_INVALIDATE__')) if((__DEBUG_OUTPUT__==2)&&version_compare(PHP_VERSION, '6.0.0')===-1) if(version_compare(PHP_VERSION, '5.3.0') >=0) $GLOBALS['__xe_autoload_file_map']
parse($input= '', $arg1=NULL, $arg2=NULL)
_tagOpen($parser, $node_name, $attrs)
if(isset($_REQUEST['encode'])) if(isset($_REQUEST['decode'])) $lang
_tagClosed($parser, $node_name)