My question is simple. I've been using ReadStartElement
and ReadEndElement
with the XmlReader
in my code just fine. The question is (and this is after looking at MSDN), do you need to match the two?
In other words, do I end with ReadEndElement
for each and every ReadStartElement
or is are there cases where you don't need so many ReadEndElement
calls in your code when reading an XML Envelop? Thee have been cases where I did not always have a matching ReadEndElement
and reading the xml worked fine.