Esempio n. 1
0
 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));
         }
     }
 }
Esempio n. 2
0
        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);
            }
        }