开发者

How to test than an XML string is well formed in .net

开发者 https://www.devze.com 2023-01-04 20:33 出处:网络
I\'m looking f开发者_JS百科or some code in .net to allow me to test an xml file to determine if it is well-formed.I am not validating the file against a schema at this point in my code, just testing t

I'm looking f开发者_JS百科or some code in .net to allow me to test an xml file to determine if it is well-formed. I am not validating the file against a schema at this point in my code, just testing that it conforms to xml specification for being well formed.

Any assistance is appreciated.


Just try parsing the XML into an XMLDocument and see if it throws.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号