Commits

Anonymous committed a1442b1

Modified Files:
LibXML.xs
+ parse_xml_chunk inits now the error function ...

Comments (0)

Files changed (1)

 void
 LibXML_cleanup_callbacks() {
     xmlSetGenericErrorFunc(NULL, NULL);
-    return;
+    return; 
 /*   warn("      cleanup parser callbacks!\n"); */
 
     xmlCleanupInputCallbacks();
                               (xmlInputOpenCallback) LibXML_input_open,
                               (xmlInputReadCallback) LibXML_input_read,
                               (xmlInputCloseCallback) LibXML_input_close);
-    xmlSetGenericErrorFunc(PerlIO_stderr(), 
+    xmlSetGenericErrorFunc( NULL , 
                            (xmlGenericErrorFunc)LibXML_error_handler);
     xmlDoValidityCheckingDefaultValue = 0;
     xmlSubstituteEntitiesDefaultValue = 1;
 
         if ( chunk != NULL ) {
             LibXML_error = sv_2mortal(newSVpv("", 0));
+            LibXML_init_callbacks();
             rv = domReadWellBalancedString( NULL, chunk );
             LibXML_cleanup_callbacks();
             LibXML_cleanup_parser();