PEAR::Config Question
| From: | Ammar Ibrahim | Date: | Sat, 09 Apr 2005 02:31:30 +0000 |
| Subject: | PEAR::Config Question | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-18652@lists.php.net to get a copy of this message | ||
I'm writing a MSSQL to MySQL Migration Utility, I'm using *Config* to manage the configuration, I want it to read from an XML file. The sturcutre is provided below. Now I want to be able to loop over 'databases' & 'tables'.
What's the best way to do this, I'd rather stay away from arrays, is there a DOM access like way to get the objects. And is there a better way to structure my XML?
<config>
<rdbms>
<source type="mssql">
<host></host>
<user></user>
<pass></pass>
</source> <destination type="mssql">
....
</destination> </rdbms>
<databases>
<database newname="legs_jo">JOLEGSZEFT</database></databases> <tables>
<table newname="foo">
<name>bar</name>
<columns>
<col newname="new_col_name" callback="intToDate>start_date</col>
</columns>
</table> </tables>
</config>