Filter XML files

Based on <http://stackoverflow.com/a/3117549/96588>