private void SkipProcessingDirective()
{
// verify that we are at a processing directive
Debug.Assert(_nextCharacter == '<' && _lookAheadCharacter == '?');
// advance twice, once to get the lookahead character and then to reach the start of the drective
this.GetNextCharacter();
this.GetNextCharacter();
while (!((_nextCharacter == '?' || _nextCharacter == '/') && _lookAheadCharacter == '>') && !this.IsAtEndOfStream)
{
// advance
// we don't need to check for entities here because '?' is not an entity
// and even though > is an entity there is no entity processing when reading lookahead character
this.GetNextCharacter();
}
if (!this.IsAtEndOfStream)
{
// advance, first to the last >
this.GetNextCharacter();
// then advance past it to the next character after processing directive
this.GetNextCharacter();
}
}