Re: [xml] xmlParseMemory ()



Hi Tom:

I am calling the function xmlParseMemory () to create a document tree. However, when the buffer being passed to it is not well-formed xml, the following error is sent to console:

*Entity: line 1: parser error : Start tag expected, '<' not found*

Is there a call I can make to check whether the buffer is well formed prior to calling xmlParseMemory and/or is there a way of suppressing the error output?

        But xmlParseMemory() *is* the one which check if buffer is
well formed.
        You can suppressing error output registering an callback that
will deal with errors. Take a look at xmlerror module (initGenericErrorDefaultFunc() and so on)

--

[]'s
Lucas Brasilino
brasilino recife pe gov br
http://www.recife.pe.gov.br
Emprel -        Empresa Municipal de Informatica (pt_BR)
                Municipal Computing Enterprise (en_US)
Recife - Pernambuco - Brasil
Fone: +55-81-34167078




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]