Refactored the filtered XML parser and it's tests.