Re: [xml] xmlRecoverDoc should take a const xmlChar* ... (?)

Daniel Veillard wrote:
On Wed, Jul 22, 2009 at 05:47:10PM +0200, Martin Trappel wrote:
Hi all!

xmlDocPtr xmlRecoverDoc (xmlChar * cur) ... takes a non-const xmlChar*

But looking at parser.c (2.6.27) shows that it just calls
xmlRecoverDoc(xmlChar *cur) {
    return(xmlSAXParseDoc(NULL, cur, 1));

and xmlSAXParseDoc takes a const xmlChar*

Maybe this should be fixed ...

  Actually the true fix would be to drop xmlRecoverDoc() since it's
contrary to the spec
and people seems to abuse it despite warnings
a broken RSS feed must be dropped at the place where the well-formedness
happens and feedback should be provided that said feed is broken.


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