0

I got a strange situation when I call a function and pass her a Stream object for the use of an creation XmlReader object.

First time this function works well, but if I call her another time and give her the same stream later on code, I got some exception that is an outcome of that XmlReader.create() return None instead of getting an allocation of an XmlReader object again, why is that?
What can I do?

John Saunders
  • 160,644
  • 26
  • 247
  • 397
JavaSa
  • 5,813
  • 16
  • 71
  • 121

1 Answers1

2

Can be that you need to reset the position between reads if you are reading the same stream twice:

streamInstance.Position = 0;
Johan Larsson
  • 17,112
  • 9
  • 74
  • 88