private static bool MoveToFirstNamespaceGlobal(ref XmlAttributeCollection attributes, ref int index) {
if (MoveToFirstNamespaceLocal(attributes, ref index)) {
return true;
}
Debug.Assert(attributes != null && attributes.parent != null);
XmlElement element = attributes.parent.ParentNode as XmlElement;
while (element != null) {
if (element.HasAttributes) {
attributes = element.Attributes;
if (MoveToFirstNamespaceLocal(attributes, ref index)) {
return true;
}
}
element = element.ParentNode as XmlElement;
}
return false;
}