diff options
Diffstat (limited to 'SAX2.c')
-rw-r--r-- | SAX2.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1824,6 +1824,7 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt, valueend - value); tmp = ret->children; while (tmp != NULL) { + tmp->doc = ret->doc; tmp->parent = (xmlNodePtr) ret; if (tmp->next == NULL) ret->last = tmp; @@ -2363,7 +2364,7 @@ xmlSAX2ProcessingInstruction(void *ctx, const xmlChar *target, "SAX.xmlSAX2ProcessingInstruction(%s, %s)\n", target, data); #endif - ret = xmlNewPI(target, data); + ret = xmlNewDocPI(ctxt->myDoc, target, data); if (ret == NULL) return; parent = ctxt->node; @@ -2634,7 +2635,7 @@ xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr) hdlr->characters = xmlSAX2Characters; hdlr->cdataBlock = xmlSAX2CDataBlock; hdlr->ignorableWhitespace = xmlSAX2IgnorableWhitespace; - hdlr->processingInstruction = NULL; + hdlr->processingInstruction = xmlSAX2ProcessingInstruction; hdlr->comment = xmlSAX2Comment; hdlr->warning = xmlParserWarning; hdlr->error = xmlParserError; |