xml_set_element_handler and equivalents
| From: | Gary . | Date: | Fri, 04 Jun 2010 11:17:17 +0000 |
| Subject: | xml_set_element_handler and equivalents | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-305803@lists.php.net to get a copy of this message | ||
I need to do essentially do what can be found in the "XML Tag Mapping
example" (http://www.php.net/manual/en/example.xml-map-tags.php) -
transform the names of some XML elements. Normally I'd use XSLT for
this kind of thing, but due to environmental considerations I can't. I
would prefer to do this in a somewhat OO manner so I can hide this
nastiness from the rest of the code.
Obviously I can't pass any of my XML handler's to
xml_set_element_handler as handlers. Nor can I find a way of
encapsulating the "map_array" (at least not without duplicating the
map).
Any ideas? Is there an equivalent for DOM or SimpleXML or something?