#27908 [Com]: xml default_handlers not being called when using libxml (works fine with expat)

From: Date: Fri, 18 Mar 2005 15:22:05 +0000
Subject: #27908 [Com]: xml default_handlers not being called when using libxml (works fine with expat)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-75468@lists.php.net to get a copy of this message
 ID:               27908
 Comment by:       werner at esmt dot org
 Reported By:      ahundiak at ingr dot com
 Status:           Verified
 Bug Type:         XML related
 Operating System: *
 PHP Version:      5CVS-2005-03-06
 New Comment:

..but what can i do, if i want to run my current php4 
applications with php5 and other webs the new libxml2 
stuff? its not really a solution, only a workaround ...


Previous Comments:
------------------------------------------------------------------------

[2005-03-06 19:45:41] sniper@php.net

It is a bug in the compatibility layer used when ext/xml is build with
libxml2. It works fine with expat. 


------------------------------------------------------------------------

[2004-04-07 12:34:00] ahundiak at ingr dot com

Description:
------------
As the test case shows, it does not appear that the default handler is
being called under PHP5RC1.  The other handlers seem to work but the
default handler is required to get the document type line.  PHP4.3.5
works. Using libxml2 2.6.5.



Reproduce code:
---------------
function x_default_handler($xp,$data) 
{ 
    echo "x_default_handler $data\n"; 
} 
$xp = xml_parser_create(); 
xml_set_default_handler($xp,'x_default_handler'); 
xml_parse($xp,'<root></root>',TRUE); 
xml_parser_free($xp); 
echo "Parse Test " . PHP_VERSION . " Done\n"; 


Expected result:
----------------
x_default_handler <root> 
x_default_handler </root> 
Parse Test 5.0.0RC1 Done 


Actual result:
--------------
Parse Test 5.0.0RC1


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=27908&edit=1


Thread (13 messages)

« previous php.bugs (#75468) next »