William McVey wrote: > It appears as if XXE (2.5p4, under linux) fails to load a document if a > comment contains two minus signs (--); even though it allows that > character sequence to be entered into the document. XXE also fails to > load a document containing a comment that ends in a dash (as in, > <!--this comment ends in a dash --->), even though it allows this > comment to be inserted into a document. I'm ok with the decision to not > load a document that isn't well formed; however, if this is the > requirement, then XXE should keep users from entering (or at least > saving) broken XML. For an XML editor to allow an XML syntax error to be > entered and saved is bad, but to not be able to use the same editor to > fix the error (after saving), is even worse.
Of course, you are right. It is very difficult to prevent the author from typing text in comments (and processing instructions) which would make the document non-well-formed. But it is very easy to forbid saving such non-well-formed XML. (Not great but better than nothing.) This bug will be fixed in next release.

