public class Test2 { public static void main(String[] args) {
 new Test2("e:\\temp");
}
class Filter implements FilenameFilter
{
public boolean accept(File dir, String name)
{
if (new File(dir,name).isDirectory())
return true;
if (name.endsWith("xml"))
return true;
return false;
}
}

public Test2(String dir)
{
check(dir);
}

public void check(String dir)
{
File f = new File(dir);
Filter fl = new Filter();
File[] farray;
farray = f.listFiles(fl);
for (int i = 0; i<farray.length; i++)
{
if (farray[i].isDirectory())
check(farray[i].getAbsolutePath());
else System.out.println(farray[i].getAbsolutePath());
}
}
}