Re: To get an associative array from an XML-file?
| From: | Manuel Holtgrewe | Date: | Sat, 04 Jan 2003 13:09:23 +0000 |
| Subject: | Re: To get an associative array from an XML-file? | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-3184@lists.php.net to get a copy of this message | ||
Hi Fredrik,
FJ> This is probobly a real newbie question. But how do I get an associative
FJ> PHP-array from an XML-file? I have been looking at XML_Tree but it
FJ> confuses me. It doesen't have to be an array, but i'm going to read
FJ> config-values and need to have the config.xml in som kind of variable-form.
Hmm, did you consider writing a simple XML parser? PHP has native for
that, so it might even be relatively fast. You could even build in
caching by writing the PHP Array into a PHP script that returns the
array.
Anyway, I just privately (I do not want to send attachements to the
list) sent you a kind of quick hack from the binarycloud project
(www.binarycloud.com) that could help you. We used it for
configuration, once, but are using custom parsers for that, now.
Bye
*manuel mailto:grin@gmx.net
--
Ist es nicht ein schöner Gedanke,
dass wir einmal alle Sterne waren
und auch wieder zu Sternen werden?