Example #1
0
        public override bool MoveToChild(string localName, string namespaceURI)
        {
            if (!_current.Elements().Any())
            {
                return(false);
            }

            var fullName = localName;

            if (!string.IsNullOrEmpty(namespaceURI))
            {
                fullName = ResultWriter.PrefixFromNamespace(namespaceURI) + ":" + localName;
            }

            var list = new ElementList(_current.Elements());

            while (list.MoveNext())
            {
                if (list.Current.Name == fullName)
                {
                    _stack.Push(list);
                    return(SetCurrent(_stack.Peek().Current));
                }
            }
            return(false);
        }