HtmlAgilityPack.HtmlNode.IsEmptyElement C# (CSharp) Method

IsEmptyElement() public static method

Determines if an element node is defined as empty.
public static IsEmptyElement ( string name ) : bool
name string The name of the element node to check. May not be null.
return bool
		public static bool IsEmptyElement(string name)
		{
			if (name == null)
			{
				throw new ArgumentNullException("name");
			}

			if (name.Length == 0)
			{
				return true;
			}

			// <!DOCTYPE ...
			if ('!' == name[0])
			{
				return true;
			}
			
			// <?xml ...
			if ('?' == name[0])
			{
				return true;
			}
			
			object flag = ElementsFlags[name.ToLower()];
			if (flag == null)
			{
				return false;
			}
			return (((HtmlElementFlag)flag)&HtmlElementFlag.Empty) != 0;
		}