refactoring

* Create Filter_XML class
* Create get_minimal_count