Exemple #1
0
 /// <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;
 }
Exemple #2
0
        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;
        }
Exemple #3
0
 // Public constructor to create an empty collection.
 public HtmlNodeCollection()
 {
     mParent = null;
 }
Exemple #4
0
 /// <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;
 }
Exemple #5
0
 /// <summary>
 /// This constructor is used by the subclasses.
 /// </summary>
 protected HtmlNode()
 {
     mParent = null;
 }
Exemple #6
0
 /// <summary>
 /// This will create an empty collection of attributes.
 /// </summary>
 /// <param name="element"></param>
 internal HtmlAttributeCollection(HtmlElement element)
 {
     mElement = element;
 }
Exemple #7
0
 public HtmlAttributeCollection()
 {
     mElement = null;
 }