HtmlAgilityPack.HtmlNode.RemoveAll C# (CSharp) Method

RemoveAll() public method

Removes all the children and/or attributes of the current node.
public RemoveAll ( ) : void
return void
		public void RemoveAll()
		{
			RemoveAllChildren();

			if (HasAttributes)
			{
				_attributes.Clear();
			}

			if ((_endnode != null) && (_endnode != this))
			{
				if (_endnode._attributes != null)
				{
					_endnode._attributes.Clear();
				}
			}
			_outerchanged = true;
			_innerchanged = true;
		}

Usage Example

Ejemplo n.º 1
0
        private static void RemoveImgTag( HtmlNode node )
        {
            if ( !node.Name.EqualsI( "img" ) ) return;

            node.RemoveAll();
        }
All Usage Examples Of HtmlAgilityPack.HtmlNode::RemoveAll