public void ExitScope()
{
while (_nsCount > 0)
{
Namespace nameSpace = _namespaces[_nsCount - 1];
if (nameSpace.Depth != _depth)
break;
if (_lastNameSpace == nameSpace)
_lastNameSpace = null;
nameSpace.Clear();
_nsCount--;
}
while (_attributeCount > 0)
{
XmlAttribute attribute = _attributes[_attributeCount - 1];
if (attribute.Depth != _depth)
break;
_space = attribute.XmlSpace;
_lang = attribute.XmlLang;
attribute.Clear();
_attributeCount--;
}
_depth--;
}