Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
07-03-2007, 02:36 PM #1
Trouble with xml_set_notation_decl_handler
I have recently moved from PHP 4.3 to PHP 5.2. I'm re-writing an XML parser and I can't seem to get xml_parse to pick up the DTD declaration from XHTML documents or the XML declaration from XML documents.
In my old code under PHP 4.3, I just used xml_set_default_handler, which seemed to work just fine. That doesn't seem to work anymore (i.e. it doesn't call the registered handler when a DTD or XML declaration is encountered). So I implemented a handler for xml_set_notation_decl_handler. Now according to the XML documentation it would seem that the registered handler should definitely be called when an XHTML DTD declaration is encountered ... but it isn't. Any ideas?
FYI, I've checked the return value for xml_set_notation_decl_handler upon registering the handler, and it returns TRUE (i.e. "everything is peachy").