summaryrefslogtreecommitdiff
path: root/data/_libxml2/formed.diff
blob: 9ff684d7caab75f30f0d4e8781bd28a226c7d58d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
diff -ru libxml2-2.6.32/parser.c libxml2-2.6.32+iPhone/parser.c
--- libxml2-2.6.32/parser.c	2008-04-08 14:47:58.000000000 +0000
+++ libxml2-2.6.32+iPhone/parser.c	2008-08-28 07:30:34.000000000 +0000
@@ -10003,7 +10003,7 @@
     xmlParseGetLasts(ctxt, &lastlt, &lastgt);
 
     while (1) {
-	if ((ctxt->errNo != XML_ERR_OK) && (ctxt->disableSAX == 1))
+	if ((ctxt->wellFormed != 1) && (ctxt->disableSAX == 1))
 	    return(0);
 
         
@@ -10881,7 +10881,7 @@
 
     if (ctxt == NULL)
         return(XML_ERR_INTERNAL_ERROR);
-    if ((ctxt->errNo != XML_ERR_OK) && (ctxt->disableSAX == 1))
+    if ((ctxt->wellFormed != 1) && (ctxt->disableSAX == 1))
         return(ctxt->errNo);
     if (ctxt->instate == XML_PARSER_START)
         xmlDetectSAX2(ctxt);
@@ -10932,7 +10932,7 @@
         (ctxt->input->buf != NULL)) {
 	xmlParserInputBufferPush(ctxt->input->buf, 1, "\r");
     }
-    if ((ctxt->errNo != XML_ERR_OK) && (ctxt->disableSAX == 1))
+    if ((ctxt->wellFormed != 1) && (ctxt->disableSAX == 1))
         return(ctxt->errNo);
     if (terminate) {
 	/*
@@ -10962,6 +10962,7 @@
 	}
 	ctxt->instate = XML_PARSER_EOF;
     }
+    if (ctxt->wellFormed) return(0);
     return((xmlParserErrors) ctxt->errNo);	      
 }