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
xmlDocPtr
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
    http://www.w3.org/TR/REC-xml/#dt-fatal
and people seems to abuse it despite warnings
  http://www.advogato.org/person/DV/diary/224.html
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.

Daniel





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