[xml] Robustness improvement.

Can now parse  https://www.w3.org/2003/entities/2007xml/unicode.xml no problem.
This commit is contained in:
Jeroen van Rijn
2021-12-01 15:30:36 +01:00
parent 32eab04d66
commit ec63d0bbd2
2 changed files with 54 additions and 23 deletions
+4
View File
@@ -36,6 +36,10 @@ print :: proc(writer: io.Writer, doc: ^Document) -> (written: int, err: io.Error
}
}
for comment in doc.comments {
written += wprintf(writer, "[Pre-root comment] %v\n", comment)
}
if doc.root != nil {
wprintln(writer, " --- ")
print_element(writer, doc.root)