+#include <libxml/SAX.h>
+
+
+// wxWindows SAX handlers for bugs reporting:
+
+static void wxXmlParserError(void *ctx, const char *msg, ...)
+{
+ wxString text;
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ if (ctxt->input)
+ text.Printf( _("XML parser error at line %d: "), ctxt->input->line );
+ va_list args;
+ wxString tmp;
+ va_start(args, msg);
+ tmp.PrintfV( msg, args );
+ va_end(args);
+ text += tmp;
+ wxLogError( text.c_str() );
+}
+
+static void wxXmlParserWarning(void *ctx, const char *msg, ...)
+{
+ wxString text;
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
+ if (ctxt->input)
+ text.Printf( _("XML parser warning at line %d: "), ctxt->input->line );
+ va_list args;
+ wxString tmp;
+ va_start(args, msg);
+ tmp.PrintfV( msg, args );
+ va_end(args);
+ text += tmp;
+ wxLogWarning( text.c_str() );
+}
+
+static xmlSAXHandler gs_wxXmlSAXHandler;
+
+