Disable debug output in libxml2 and xmlsec
        Posted  
        
            by ereOn
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by ereOn
        
        
        
        Published on 2010-05-10T08:36:11Z
        Indexed on 
            2010/05/10
            9:34 UTC
        
        
        Read the original article
        Hit count: 517
        
Hi,
In my software, I use libxml2 and xmlsec to manipulate (obviously) XML data structures. I mainly use XSD schema validation and so far, it works well.
When the data structure input by the client doesn't match the XSD schema, libxml2 (or xmlsec) output some debug strings to the console.
Here is an example:
Entity: line 1: parser error : Start tag expected, '<' not found
DUMMY<?xml
^
While those strings are useful for debugging purposes, I don't want them to appear and polute the console output in the released software. So far, I couldn't find an official way of doing this.
Do you know how to suppress the debug output or (even better) to redirect it to a custom function ?
Many thanks.
© Stack Overflow or respective owner