ikorin24 / U8XmlParser

Extremely fast UTF-8 xml parser library
MIT License
95 stars 13 forks source link

The parser should be able to read the xml with comments at the end. #32

Closed ikorin24 closed 2 years ago

ikorin24 commented 2 years ago

Describe the bug:

If there is a comment at the end of the xml, parsing will fail.

Environment:

library version: 1.6.0 .NET version: .NET6 OS: Windows10

Steps to Reproduce:

Execute the following code.

using var xml = XmlParser.Parse(
@"<foo></foo>
<!-- comment -->");

Expected behavior:

No errors.

Actual Behavior:

A FormatException is thrown. Message:

"(line 2, char 1): Xml does not have multiple root nodes."