private void PushElement() { _resolver.PushScope(); foreach (XAttribute a in _attributes) { if (a.IsNamespaceDeclaration) { _resolver.Add(a.Name.NamespaceName.Length == 0 ? string.Empty : a.Name.LocalName, XNamespace.Get(a.Value)); } } }
private void PushElement(XElement e) { _resolver.PushScope(); XAttribute a = e.lastAttr; if (a != null) { do { a = a.next; if (a.IsNamespaceDeclaration) { _resolver.Add(a.Name.NamespaceName.Length == 0 ? string.Empty : a.Name.LocalName, XNamespace.Get(a.Value)); } } while (a != e.lastAttr); } }