mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
added SAX.h mostly useful for the doc generation Regenerated all the docs, Daniel
This commit is contained in:
10
parser.c
10
parser.c
@ -582,7 +582,7 @@ xmlNewInputFromFile(xmlParserCtxtPtr ctxt, const char *filename) {
|
||||
inputStream->base = inputStream->buf->buffer->content;
|
||||
inputStream->cur = inputStream->buf->buffer->content;
|
||||
if ((ctxt->directory == NULL) && (directory != NULL))
|
||||
ctxt->directory = directory;
|
||||
ctxt->directory = (char *) xmlStrdup((const xmlChar *) directory);
|
||||
return(inputStream);
|
||||
}
|
||||
|
||||
@ -4441,7 +4441,11 @@ xmlParseExternalSubset(xmlParserCtxtPtr ctxt, const xmlChar *ExternalID,
|
||||
if ((CUR == '<') && (NXT(1) == '?') &&
|
||||
(NXT(2) == 'x') && (NXT(3) == 'm') &&
|
||||
(NXT(4) == 'l')) {
|
||||
xmlParseTextDecl(ctxt);
|
||||
xmlChar *decl;
|
||||
|
||||
decl = xmlParseTextDecl(ctxt);
|
||||
if (decl != NULL)
|
||||
xmlFree(decl);
|
||||
}
|
||||
if (ctxt->myDoc == NULL) {
|
||||
ctxt->myDoc = xmlNewDoc(BAD_CAST "1.0");
|
||||
@ -6662,6 +6666,8 @@ xmlSAXUserParseFile(xmlSAXHandlerPtr sax, void *user_data,
|
||||
|
||||
ctxt = xmlCreateFileParserCtxt(filename);
|
||||
if (ctxt == NULL) return -1;
|
||||
if (ctxt->sax != &xmlDefaultSAXHandler)
|
||||
xmlFree(ctxt->sax);
|
||||
ctxt->sax = sax;
|
||||
ctxt->userData = user_data;
|
||||
|
||||
|
Reference in New Issue
Block a user