예제 #1
0
<?php

require_once '../config.php';
require_once ROOT_PATH . '/models/Parser.php';
require_once ROOT_PATH . '/models/Database.php';
require_once ROOT_PATH . '/models/Animal.php';
$parser_obj = new \models\Parser($dir_path);
$xml_content = $parser_obj->writeXMLInDB();
echo json_encode($xml_content);
예제 #2
0
 public function parse()
 {
     $parser = new \models\Parser();
     $this->data = $parser->parseExcel($_POST['excel_input']);
 }
예제 #3
0
<div class="xml-content">
    <?php 
$parser_obj = new \models\Parser($dir_path);
$all_xml_paths = $parser_obj->getXMLPaths($dir_path);
?>
    <h2>Full paths to all XML files <?php 
echo $parser_obj->isDerectory() ? 'in folder <strong>' . $parser_obj->getFolderName() . '</strong>' : '';
?>
</h2>
    <p>Number of files: <?php 
echo count($all_xml_paths);
?>
</p>
    <ol class="full-xml-paths">
        <?php 
foreach ($all_xml_paths as $key => $single_xml_path) {
    ?>
            <li><?php 
    echo $single_xml_path;
    ?>
</li>
            <?php 
}
?>
    </ol>
    <a href="#" class="btn btn-info" id="add-xml-data">Import XML data into database</a>
</div>