Working with XML: DomDocument or SimpleXML?
| From: | Colin Guthrie | Date: | Thu, 20 Sep 2007 19:34:32 +0000 |
| Subject: | Working with XML: DomDocument or SimpleXML? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-262306@lists.php.net to get a copy of this message | ||
Hi,
Just wondering what people's general opinion is on working with XML in PHP?
I like working with SimpleXML but DomDocument seems more useful in some
cases (e.g. working with XSLT transforms etc.).
So what do you thing? Or do would you simply create a few utility
classes to handle conversions?
I have written a utility class myself that represents XML internall in
either DomDocument, SimpleXML or String format and allows you to access
it any of the three which means you can just pass XML "object" around
and use it accordingly depending on the circumstances.
I'd be interested to hear other peoples thoughts on the matter tho'.
Cheers
Col