Re: XML Array
| From: | Mike Migurski | Date: | Wed, 16 Jul 2003 00:14:31 +0000 |
| Subject: | Re: XML Array | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-155347@lists.php.net to get a copy of this message | ||
>I'm looking for a function to take an XML file and turn it into a PHP
>array with the same structure. So if I have:
It's not one function, but you could use xml_parse() with
appropriately-defined handlers for character data and open/close elements:
http://php.net/xml
There is also http://php.net/xml_parse_into_struct, which
doesn't generate
exactly what you want, but it "generates structures amenable of being
transversed in a tree fashion."
-mike.
---------------------------------------------------------------------
michal migurski- contact info and pgp key:
sf/ca http://mike.teczno.com/contact.html