Esempio n. 1
0
        /// <summary>
        /// 子孫の要素の値を指定して取得
        /// </summary>
        /// <param name="els"></param>
        /// <param name="tag"></param>
        /// <returns></returns>
        public static EXElements operator *(EXElements els, string tag)
        {
            EXElements items = new EXElements();

            foreach (EXElement el in els)
            {
                var lst = el.selectNodes(tag, true);
                items.AddRange(lst);
            }
            return(items);
        }
Esempio n. 2
0
        public static EXElements operator !=(EXAttrs ats, string val)
        {
            EXElements items = new EXElements();

            foreach (EXAttr at in ats)
            {
                if (at.Value != val)
                {
                    items.Add(at._exElement);
                }
            }
            return(items);
        }
Esempio n. 3
0
        /// <summary>
        /// 子要素を探索する
        /// </summary>
        /// <param name="doc"></param>
        /// <param name="s"></param>
        /// <returns></returns>
        public static EXElements operator /(EXDocument doc, string tag)
        {
            EXElements items = new EXElements();

            if (doc.DocumentElement != null)
            {
                if (doc.DocumentElement.Name == tag)
                {
                    items.Add(doc.DocumentElement);
                }
            }
            return(items);
        }
Esempio n. 4
0
        public static EXElements operator !=(EXElements els, string val)
        {
            EXElements items = new EXElements();

            foreach (EXElement el in els)
            {
                if (el.Value != val)
                {
                    items.Add(el);
                }
            }
            return(items);
        }
Esempio n. 5
0
        /// <summary>
        /// 子孫要素を探索する
        /// </summary>
        /// <param name="doc"></param>
        /// <param name="tag"></param>
        /// <returns></returns>
        public static EXElements operator *(EXDocument doc, string tag)
        {
            EXElements items = new EXElements();

            if (doc.DocumentElement != null)
            {
                if (doc.DocumentElement.Name == tag)
                {
                    items.Add(doc.DocumentElement);
                }
                items.AddRange(doc.DocumentElement.selectNodes(tag, true));
            }
            return(items);
        }
Esempio n. 6
0
        internal protected EXElements selectNodes(string tag, bool childSeek = false)
        {
            EXElements items = new EXElements();

            foreach (EXElement el in this.ChildNodes)
            {
                if (el.Name == tag)
                {
                    items.Add(el);
                }
                if (childSeek == true)
                {
                    items.AddRange(el.selectNodes(tag, true));
                }
            }
            return(items);
        }
Esempio n. 7
0
        public static EXElements operator *(EXElement el, string tag)
        {
            EXElements items = el.selectNodes(tag, true);

            return(items);
        }