AW: [PEAR-DEV] [PEPr] Proposal for XML::XML_Simple
| From: | Stephan Schmidt | Date: | Mon, 19 Jan 2004 22:56:05 +0000 |
| Subject: | AW: [PEAR-DEV] [PEPr] Proposal for XML::XML_Simple | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-25157@lists.php.net to get a copy of this message | ||
Hi,
> XML_Serializer's Unserializer mimicks SimpleXML AFAIK... so you
> shouldn't replicate that code again...
>
> Otherwise, the backwards compatible thing is a good idea...
XML_Serializer/Unserializer is able to mimick simpleXML to some extend.
But you have to be careful and design your XML files and classes in a
certain way. Furthermore you have to set the correct options. That means
it can be a pain in the *** if you want to use it as a drop-in
replacement for the PHP5 extension (I know it, it's my code).
Furthermore you have to instantaite two classes (that means you also
include some functionality you do not need). Furthermore it will never
be possible to load an XML
document, change properties and then call asXML() on the result object
to save it back to disk.
XML_Simple provides an interchangeable backend, that lets you switch
between simpleXML and a Sax backend that work the same way (besides some
minor problems).
If you installed the examples, try them with PHP5 and exchange the 'Sax'
driver with 'SimpleXML' and they still work (but will be much faster).
So I think XML_Simple would make a great addition to PEAR and will allow
people to use simpleXML in applications that also work in PHP4, without
adjusting code.
Stephan