private void ParseCDataOrComment(XmlNodeType type)
{
int startPos, endPos;
if (_parsingMode == ParsingMode.Full)
{
_curNode.SetLineInfo(_ps.LineNo, _ps.LinePos);
Debug.Assert(_stringBuilder.Length == 0);
if (ParseCDataOrComment(type, out startPos, out endPos))
{
_curNode.SetValueNode(type, _ps.chars, startPos, endPos - startPos);
}
else
{
do
{
_stringBuilder.Append(_ps.chars, startPos, endPos - startPos);
} while (!ParseCDataOrComment(type, out startPos, out endPos));
_stringBuilder.Append(_ps.chars, startPos, endPos - startPos);
_curNode.SetValueNode(type, _stringBuilder.ToString());
_stringBuilder.Length = 0;
}
}
else
{
while (!ParseCDataOrComment(type, out startPos, out endPos)) ;
}
}