added function to parse from an input channel

The current implementation reads the input channel completely
and then parses the resulting string.