function getNewParserOutput($xml_file) { $newXmlQueryParser = new XmlQueryParser(); $xml_obj = $newXmlQueryParser->getXmlFileContent($xml_file); $parser = new QueryParser($xml_obj->query); return $parser->toString(); }
/** * 1. Read xml file<br /> * 2. Check the action<br /> * 3. Parsing and write a cache file<br /> * @return QueryParser object */ function &parse_xml_query($query_id, $xml_file, $cache_file) { // Read xml file $xml_obj = $this->getXmlFileContent($xml_file); // insert, update, delete, select action $action = strtolower($xml_obj->query->attrs->action); if (!$action) { return; } // Write query cache file $parser = new QueryParser($xml_obj->query); FileHandler::writeFile($cache_file, $parser->toString()); return $parser; }