.NET IsValidXml Extension Method Performance

Posted by tyndall on Stack Overflow See other posts from Stack Overflow or by tyndall
Published on 2010-04-08T14:02:37Z Indexed on 2010/04/08 14:13 UTC
Read the original article Hit count: 226

Filed under:
|
|
|
|

I have a legacy application that I inherited that passes a lot of XML around as Strings.

I often need the ability to check if a String will be valid XML. What is the fastest and least expensive way to check if a string is valid XML in .NET?

I'm working in .NET 3.5 and would most likely use this as an extension method (off of string) in this one project within the solution.

© Stack Overflow or respective owner

Related posts about xml-validation

Related posts about Xml