]> www.infradead.org Git - users/dwmw2/ews-sync.git/commitdiff
Add XML_PARSE_RECOVER
authorDavid Woodhouse <dwmw2@infradead.org>
Mon, 19 Jul 2010 08:00:20 +0000 (09:00 +0100)
committerDavid Woodhouse <dwmw2@infradead.org>
Mon, 19 Jul 2010 08:00:20 +0000 (09:00 +0100)
Sometimes, Exchange seems to include the terminating NUL on the body
description, leading to:

noname.xml:80: parser error : xmlParseCharRef: invalid xmlChar value 0
&#x0;</t:Body>
     ^
Failed to parse XML

ews2ical.c

index 7ab05c6978312b57a42c3001395430a62e5067e7..410aa2916008b6d3691b42ea2f5a79939736290b 100644 (file)
@@ -70,7 +70,7 @@ int main(int argc, char **argv)
                return -1;
        }
        read(xmlfd, buf, 1);
-       xml_doc = xmlReadFd(xmlfd, "noname.xml", "utf-8", 0);
+       xml_doc = xmlReadFd(xmlfd, "noname.xml", "utf-8", XML_PARSE_RECOVER);
        if (!xml_doc) {
                fprintf(stderr, "Failed to parse XML\n");
                return -1;