Extending SimpleXML

November 1st, 2005

Christian Stocker quoted Rob Richards from the PHP internals mailing list on how to extend SimpleXML. Someone needed more information of the structure of the XML document, for example the name of the node. On the list it was suggested to use the DOM extension which can, without too much overhead, import SimpleXML document (which can be re-imported to SimpleXML again).

The solution adviced on the list was to derive a class from SimpleXMLElement, pass this class to the simplexml_load_* function as second parameter.

Entry Filed under: PHP

Leave a Comment

hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Calendar

November 2005
M T W T F S S
« Oct   Dec »
 123456
78910111213
14151617181920
21222324252627
282930  

Most Recent Posts