public static ValidateXml ( string xml ) : bool | ||
xml | string | |
return | bool |
public static bool ValidateXml (string xml)
{
try
{
XmlDocument xmlDoc = new XmlDocument ();
xmlDoc.LoadXml (xml);
return true;
}
catch (Exception)
{
return false;
}
}