Added the ability to read xml from a stream, instead of from a string.