in src/Microsoft.VisualStudio.SlowCheetah/Transformer/XmlTransformer.cs [80:107]
public bool IsFileSupported(string filePath)
{
if (string.IsNullOrWhiteSpace(filePath))
{
throw new ArgumentNullException(nameof(filePath));
}
if (!File.Exists(filePath))
{
throw new FileNotFoundException(Resources.Resources.ErrorMessage_FileNotFound, filePath);
}
try
{
using (XmlTextReader xmlTextReader = new XmlTextReader(filePath))
{
// This is required because if the XML file has a DTD then it will try and download the DTD!
xmlTextReader.DtdProcessing = DtdProcessing.Ignore;
xmlTextReader.Read();
return true;
}
}
catch (XmlException)
{
}
return false;
}