private bool ReadContent ()
{
switch (reader.ReadState) {
case ReadState.Closed:
case ReadState.Error:
case ReadState.EndOfFile:
return false;
}
if (popScope) {
nsmgr.PopScope ();
popScope = false;
if (elementStack.Count == 0)
// it reached to the end of document element,
// so reset to non-validating state.
currentAutomata = null;
}
bool b = !reader.EOF;
if (shouldResetCurrentTextValue) {
currentTextValue = null;
shouldResetCurrentTextValue = false;
}
else
b = reader.Read ();
if (!b) {
if (elementStack.Count != 0)
throw new InvalidOperationException ("Unexpected end of XmlReader.");
return false;
}
return ProcessContent ();
}