StreamInput streamSource = null;
if (element.hasAttribute("file")) {
String fileName = element.getAttribute("file");
File file = new File(fileName);
if (file.exists() && file.isFile()) {
streamSource = new FileStreamInput(file);
parser.importStream(streamSource, element, parse);
} else {
parse.addProblem("file "+fileName+" isn't a file", element);
}
}