HtmlAgilityPack.HtmlNode.GetId C# (CSharp) Method

GetId() private method

private GetId ( ) : string
return string
		internal string GetId()
		{
			HtmlAttribute att = Attributes["id"];
			if (att == null)
			{
				return null;
			}
			return att.Value;
		}

Usage Example

示例#1
0
        public HtmlNode RemoveChild(HtmlNode oldChild)
        {
            if (oldChild == null)
            {
                throw new ArgumentNullException(nameof(oldChild));
            }
            int index = -1;

            if (this._childnodes != null)
            {
                index = this._childnodes[oldChild];
            }
            if (index == -1)
            {
                throw new ArgumentException(HtmlDocument.HtmlExceptionRefNotChild);
            }
            if (this._childnodes != null)
            {
                this._childnodes.Remove(index);
            }
            this._ownerdocument.SetIdForNode((HtmlNode)null, oldChild.GetId());
            this._outerchanged = true;
            this._innerchanged = true;
            return(oldChild);
        }
All Usage Examples Of HtmlAgilityPack.HtmlNode::GetId