public TextElement GetSubElement(params string[] names) { for (int i = 0; i < this.SubElementsCount; i++) { if (PhpFuctions.in_array(this.SubElements[i].ElemName, names)) { return(this.SubElements[i]); } } return(null); }
public TextElement NextElementWN(params string[] names) { var next = this.NextElement(); while (next != null) { if (next.ElementType == TextElementType.Parameter || next.ElemName == "#text") { next = next.NextElement(); continue; } if (PhpFuctions.in_array(next.ElemName, names)) { return(next); } next = next.NextElement(); } return(null); }
public TextElement PreviousElementWN(params string[] names) { var prev = this.PreviousElement(); while (prev != null) { if (prev.ElementType == TextElementType.Parameter || prev.ElemName == "#text") { prev = prev.PreviousElement(); continue; } if (PhpFuctions.in_array(prev.ElemName, names)) { return(prev); } prev = prev.PreviousElement(); } return(null); }