Don't consider io.EOF as an error.

The internal xml.Decoder object returns io.EOF to signal the end of the input stream which is a bit different than an unexpected EOF which is returned as such. So io.EOF should not be considered an error.
Fix documentation code.