GetAttributeValue() public méthode

Get the value of the specified attribute.
public GetAttributeValue ( String name ) : String
name String The name of an attribute.
Résultat String
        /// <summary>
        /// Called by loadContents to load a div tag.
        /// </summary>
        /// <param name="index">The index to begin at.</param>
        /// <param name="tag">The beginning div tag.</param>
        private void LoadDiv(int index, Tag tag)
        {
            var div = new Div(_page);
            String classAttribute = tag.GetAttributeValue("class");
            String idAttribute = tag.GetAttributeValue("id");

            div.IdAttribute = idAttribute;
            div.ClassAttribute = (classAttribute);
            div.Begin = index;
            div.End = FindEndTag(index + 1, tag);
            AddHierarchyElement(div);
        }
        /// <summary>
        /// Called by loadContents to load a span.
        /// </summary>
        /// <param name="index">The index to begin loading at.</param>
        /// <param name="tag">The beginning tag.</param>
        private void LoadSpan(int index, Tag tag)
        {
            var span = new Span(_page);
            String classAttribute = tag.GetAttributeValue("class");
            String idAttribute = tag.GetAttributeValue("id");

            span.IdAttribute = idAttribute;
            span.ClassAttribute = classAttribute;
            span.Begin = index;
            span.End = FindEndTag(index + 1, tag);
            AddHierarchyElement(span);
        }
        /// <summary>
        /// Called by loadContents to load an input tag on the form.
        /// </summary>
        /// <param name="index">The index to begin loading at.</param>
        /// <param name="tag">The beginning tag.</param>
        protected void LoadInput(int index, Tag tag)
        {
            String type = tag.GetAttributeValue("type");
            String name = tag.GetAttributeValue("name");
            String value = tag.GetAttributeValue("value");

            var input = new Input(_page);
            input.Type = type;
            input.Name = name;
            input.Value = value;

            if (_lastForm != null)
            {
                _lastForm.AddElement(input);
            }
            else
            {
                _page.AddContent(input);
            }
        }
        /// <summary>
        /// Called by loadContents to load a link on the page.
        /// </summary>
        /// <param name="index">The index to begin loading at.</param>
        /// <param name="tag">The beginning tag.</param>
        protected void LoadLink(int index, Tag tag)
        {
            var link = new Link(_page);
            String href = tag.GetAttributeValue("href");

            if (href != null)
            {
                link.Target = new Address(_baseURL, href);
                link.Begin = index;
                link.End = FindEndTag(index + 1, tag);
                _page.AddContent(link);
            }
        }
Exemple #5
0
 private void xd333635ed28a1b6d(int xc0c4c459c6ccbd00, Tag xffe521cc76054baf)
 {
     string str;
     Div div = new Div(this._xbbe2f7d7c86e0379);
     if ((((uint) xc0c4c459c6ccbd00) - ((uint) xc0c4c459c6ccbd00)) >= 0)
     {
         str = xffe521cc76054baf.GetAttributeValue("class");
     }
     string attributeValue = xffe521cc76054baf.GetAttributeValue("id");
     div.IdAttribute = attributeValue;
     div.ClassAttribute = str;
     div.Begin = xc0c4c459c6ccbd00;
     div.End = this.FindEndTag(xc0c4c459c6ccbd00 + 1, xffe521cc76054baf);
     do
     {
         this.x9d4db4971b8e4b59(div);
     }
     while (0xff == 0);
 }
        /// <summary>
        /// Called by loadContents to load a form on the page.
        /// </summary>
        /// <param name="index">The index to begin loading at.</param>
        /// <param name="tag">The beginning tag.</param>
        protected void LoadForm(int index, Tag tag)
        {
            String method = tag.GetAttributeValue("method");
            String action = tag.GetAttributeValue("action");

            var form = new Form(_page);
            form.Begin = index;
            form.End = FindEndTag(index + 1, tag);

            if ((method == null) || string.Compare(method, "GET", true) == 0)
            {
                form.Method = Form.FormMethod.Get;
            }
            else
            {
                form.Method = Form.FormMethod.Post;
            }

            if (action == null)
            {
                form.Action = new Address(_baseURL);
            }
            else
            {
                form.Action = new Address(_baseURL, action);
            }

            _page.AddContent(form);
            _lastForm = form;
        }
Exemple #7
0
 private void xc4283bf79484a931(int xc0c4c459c6ccbd00, Tag xffe521cc76054baf)
 {
     Span span = new Span(this._xbbe2f7d7c86e0379);
     string attributeValue = xffe521cc76054baf.GetAttributeValue("class");
     string str2 = xffe521cc76054baf.GetAttributeValue("id");
     span.IdAttribute = str2;
     span.ClassAttribute = attributeValue;
     if (((uint) xc0c4c459c6ccbd00) >= 0)
     {
         span.Begin = xc0c4c459c6ccbd00;
         span.End = this.FindEndTag(xc0c4c459c6ccbd00 + 1, xffe521cc76054baf);
     }
     this.x9d4db4971b8e4b59(span);
 }
Exemple #8
0
 protected void LoadLink(int index, Tag tag)
 {
     Link span = new Link(this._xbbe2f7d7c86e0379);
     string attributeValue = tag.GetAttributeValue("href");
     if (attributeValue != null)
     {
         span.Target = new Address(this._x1554c0f0264b8597, attributeValue);
         span.Begin = index;
         if ((((uint) index) + ((uint) index)) >= 0)
         {
             span.End = this.FindEndTag(index + 1, tag);
         }
         this._xbbe2f7d7c86e0379.AddContent(span);
     }
 }
Exemple #9
0
 protected void LoadInput(int index, Tag tag)
 {
     string str2;
     string str3;
     Input input;
     string attributeValue = tag.GetAttributeValue("type");
     goto Label_007E;
     Label_0043:
     if (this._xddf51e0bb7096df0 != null)
     {
         this._xddf51e0bb7096df0.AddElement(input);
         return;
     }
     if ((((uint) index) + ((uint) index)) <= uint.MaxValue)
     {
         this._xbbe2f7d7c86e0379.AddContent(input);
         if (((uint) index) >= 0)
         {
             return;
         }
         goto Label_007E;
     }
     Label_0067:
     input.Type = attributeValue;
     input.Name = str2;
     Label_0075:
     input.Value = str3;
     goto Label_0043;
     Label_007E:
     str2 = tag.GetAttributeValue("name");
     str3 = tag.GetAttributeValue("value");
     input = new Input(this._xbbe2f7d7c86e0379);
     if (8 == 0)
     {
         goto Label_0075;
     }
     if (0 == 0)
     {
         goto Label_0067;
     }
     goto Label_0043;
 }
Exemple #10
0
 protected void LoadForm(int index, Tag tag)
 {
     string str2;
     Form form;
     string attributeValue = tag.GetAttributeValue("method");
     goto Label_00E4;
     Label_0011:
     if (str2 == null)
     {
         form.Action = new Address(this._x1554c0f0264b8597);
     }
     else
     {
         form.Action = new Address(this._x1554c0f0264b8597, str2);
     }
     this._xbbe2f7d7c86e0379.AddContent(form);
     this._xddf51e0bb7096df0 = form;
     if (0 != 0)
     {
         goto Label_00E4;
     }
     if ((((uint) index) - ((uint) index)) <= uint.MaxValue)
     {
         return;
     }
     Label_0057:
     form.Method = Form.FormMethod.Post;
     goto Label_0011;
     Label_007A:
     if (attributeValue != null)
     {
         goto Label_00C9;
     }
     Label_007D:
     form.Method = Form.FormMethod.Get;
     goto Label_0011;
     Label_00C9:
     if (string.Compare(attributeValue, "GET", true) != 0)
     {
         goto Label_0057;
     }
     if (0 == 0)
     {
         goto Label_007D;
     }
     goto Label_007A;
     Label_00E4:
     str2 = tag.GetAttributeValue("action");
     form = new Form(this._xbbe2f7d7c86e0379);
     if (0 == 0)
     {
         if ((((uint) index) & 0) == 0)
         {
             form.Begin = index;
             form.End = this.FindEndTag(index + 1, tag);
         }
         if ((((uint) index) - ((uint) index)) <= uint.MaxValue)
         {
             goto Label_007A;
         }
         goto Label_00C9;
     }
     goto Label_0057;
 }
        /// <summary>
        /// Called by loadContents to load a link on the page.
        /// </summary>
        /// <param name="index">The index to begin loading at.</param>
        /// <param name="tag">The beginning tag.</param>
        protected void LoadLink(int index, Tag tag)
        {
            Link link = new Link(this.page);
            String href = tag.GetAttributeValue("href");

            if (href != null)
            {
                link.setTarget(new Address(this.baseURL, href));
                link.Begin = index;
                link.End = FindEndTag(index + 1, tag);
                this.page.AddContent(link);
            }
        }