If I understood your question right, I think you can solve your problem like this:
public class HomeController : Controller{
public ActionResult Index(string filename){
if(filename != null){
string ext = // parse the filename and get the extension
/*
can't test, but I think
System.IO.Path.GetExtension(filename);
should work
*/
if(ext == "xml"){
// do stuff
return new XmlResult(/* filepath or something */);
}
}
// do stuff
// return the view you want if no filename or not a xml extension
return View();
}
}