Convert list generator into a SAX filter from a content handler

Implementing a filter instead of a simple content handler allows
separating code into multiple filters and reusing filters between
different parts of the code.