public IFileParser Create()
{
if (!File.Exists(FilePath))
throw new FileNotFoundException("The specified file was not found.", FilePath);
if(Encoding == null)
Encoding = System.Text.Encoding.Default;
if(ParseStrategy == null)
ParseStrategy = FileParsing.ParseStrategy.LeaveUnchanged();
string extension = Path.GetExtension(FilePath);
if (extension == ".html" || extension == ".htm")
return new HtmlFileParser(FilePath, Encoding, ParseStrategy);
return new BaseFileParser(FilePath, Encoding, ParseStrategy);
}