Re: Which simple XML functions to use?
| From: | Jochem Maas | Date: | Wed, 06 Jun 2007 00:24:21 +0000 |
| Subject: | Re: Which simple XML functions to use? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-256145@lists.php.net to get a copy of this message | ||
Marten Lehmann wrote:
> Hello,
>
> mostly dealing with XML through the Perl-module XML::Simple I'm looking
> for a simple solution within PHP. PHP4 and PHP5 is available but the DOM
> XML-stuff seems to be bloated.
>
> What I'm looking is a function that receives an XML-document as a
> string, which parses the document which all its tags and attributes and
> which then returns an associative array.
>
> Is there anything available which comes close to my expectations?
simpleXML, which although it actually returns objects allows array like
access by virtue of the fact that the objects implement the necessary array overload
interfaces available in SPL.
some usage examples:
http://lerdorf.com/php/flickr_api.phps
http://talks.php.net/show/torkey06/16
http://www.devshed.com/c/a/PHP/Loading-XML-Strings-with-simpleXML-in-PHP-5/1/
>
> Regards
> Marten
>