Implement reading xml from reader/stream/file.