The same way Filter uses the GML parser's readers?
https://github.com/bartvde/ol3/blob/ogcfilter2/src/ol/parser/ogc/filter_v1.js#L580:L581