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); }
/// <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); }
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); }
/// <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); }
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); }