/// <summary> /// A collection is usually associated with a parent node (an HtmlElement, actually) /// but you can pass null to implement an abstracted collection. /// </summary> /// <param name="parent">The parent element, or null if it is not appropriate</param> internal HtmlNodeCollection(HtmlElement parent) { mParent = parent; }
private static bool IsProcessElement(HtmlElement element) { bool isFlag = false; foreach (HtmlAttribute t in element.Attributes) { if (t.Value != null) { if (t.Value.ToLower().IndexOf(".jpg") > 0 || t.Value.ToLower().IndexOf(".gif") > 0) { isFlag = true; break; } } } return isFlag; }
// Public constructor to create an empty collection. public HtmlNodeCollection() { mParent = null; }
/// <summary> /// Internal method to maintain the identity of the parent node. /// </summary> /// <param name="parentNode">The parent node of this one</param> internal void SetParent(HtmlElement parentNode) { mParent = parentNode; }
/// <summary> /// This constructor is used by the subclasses. /// </summary> protected HtmlNode() { mParent = null; }
/// <summary> /// This will create an empty collection of attributes. /// </summary> /// <param name="element"></param> internal HtmlAttributeCollection(HtmlElement element) { mElement = element; }
public HtmlAttributeCollection() { mElement = null; }