xmlParser = xml_parser_create(); xml_set_object($this->xmlParser, $this); xml_parser_set_option($this->xmlParser, XML_OPTION_CASE_FOLDING, 1); xml_parser_set_option($this->xmlParser, XML_OPTION_SKIP_WHITE, 1); } /** * Starts the parsing. * * @param String $filename file name * @return array XML structure */ function parse($filename) { if(file_exists($filename)) { $xmlStructure = array(); $xmlIndex = array(); $xmlContent = xml_parse_into_struct($this->xmlParser, implode("", file($filename)), $xmlStructure, $xmlIndex); return array($xmlStructure, $xmlIndex); } return array(); } } ?>