Пример #1
0
        public IEnumerable <Element> GetElementsWithAttribute(String attribute)
        {
            ElementListIter iter = new ElementListIter();

            Element_GetElementsWithAttribute(ptr, iter.Ptr, attribute);
            iter.startIterator();
            Element element;

            do
            {
                element = iter.getNextElement();
                if (element != null)
                {
                    yield return(element);
                }
            } while (element != null);
            iter.Dispose();
        }
Пример #2
0
        public IEnumerable <Element> GetElementsByTagName(String tag)
        {
            ElementListIter iter = new ElementListIter();

            Element_GetElementsByTagName(ptr, iter.Ptr, tag);
            iter.startIterator();
            Element element;

            do
            {
                element = iter.getNextElement();
                if (element != null)
                {
                    yield return(element);
                }
            } while (element != null);
            iter.Dispose();
        }