Create basic structure of XML query

This commit is contained in:
Kijin Sung 2020-06-22 16:53:44 +09:00
parent c97b161e42
commit 20025077f7
11 changed files with 303 additions and 8 deletions

View file

@ -2,8 +2,6 @@
namespace Rhymix\Framework\Parsers;
use Rhymix\Framework\Storage;
/**
* DB table parser class for XE compatibility.
*/
@ -35,10 +33,6 @@ class DBTableParser
*/
public static function loadXML(string $filename)
{
// Initialize table definition.
$table = new DBTable\Table;
$table->name = preg_replace('/\.xml$/', '', basename($filename));
// Load the XML file.
$xml = simplexml_load_string(file_get_contents($filename));
if ($xml === false)
@ -46,6 +40,10 @@ class DBTableParser
return false;
}
// Initialize table definition.
$table = new DBTable\Table;
$table->name = preg_replace('/\.xml$/', '', basename($filename));
// Load columns.
foreach ($xml->column as $column_info)
{