Reading XML with unclosed tags in C#

前端 未结 3 692
我寻月下人不归
我寻月下人不归 2021-01-13 23:48

I have a program which runs tests and generates a grid-view with all the results in it, and also an XML log file. The program also has the functionality to load logs to repl

3条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-14 00:16

    There is no such thing in the Framework taht does this by default, neither is there a good solution available that will somehow parse generic invalid xml.

    The most sensable thing yu can do is fixing the XML before starting to read it. Since only the end is cut off you should be able to figure out all open tags and close them.

提交回复
热议问题