Click or drag to resize

HtmlNode Class

Represents an HTML node.
Inheritance Hierarchy

Namespace:  WorkflowGen.My.HtmlAgilityPack
Assembly:  WorkflowGen.My (in WorkflowGen.My.dll) Version: 4.7.2.0 (4.7.2.0)
Syntax
public class HtmlNode : IXPathNavigable

The HtmlNode type exposes the following members.

Constructors
  NameDescription
Public methodHtmlNode
Initializes HtmlNode, providing type, owner and where it exists in a collection
Top
Properties
  NameDescription
Public propertyAttributes
Gets the collection of HTML attributes for this node. May not be null.
Public propertyChildNodes
Gets all the children of the node.
Public propertyClosed
Gets a value indicating if this node has been closed or not.
Public propertyClosingAttributes
Gets the collection of HTML attributes for the closing tag. May not be null.
Public propertyFirstChild
Gets the first child of the node.
Public propertyHasAttributes
Gets a value indicating whether the current node has any attributes.
Public propertyHasChildNodes
Gets a value indicating whether this node has any child nodes.
Public propertyHasClosingAttributes
Gets a value indicating whether the current node has any attributes on the closing tag.
Public propertyId
Gets or sets the value of the 'id' HTML attribute. The document must have been parsed using the OptionUseIdAttribute set to true.
Public propertyInnerHtml
Gets or Sets the HTML between the start and end tags of the object.
Public propertyInnerText
Gets or Sets the text between the start and end tags of the object.
Public propertyLastChild
Gets the last child of the node.
Public propertyLine
Gets the line number of this node in the document.
Public propertyLinePosition
Gets the column number of this node in the document.
Public propertyName
Gets or sets this node's name.
Public propertyNextSibling
Gets the HTML node immediately following this element.
Public propertyNodeType
Gets the type of this node.
Public propertyOriginalName
The original unaltered name of the tag
Public propertyOuterHtml
Gets or Sets the object and its content in HTML.
Public propertyOwnerDocument
Gets the HtmlDocument to which this node belongs.
Public propertyParentNode
Gets the parent of this node (for nodes that can have parents).
Public propertyPreviousSibling
Gets the node immediately preceding this node.
Public propertyStreamPosition
Gets the stream position of this node in the document, relative to the start of the document.
Public propertyXPath
Gets a valid XPath string that points to this node
Top
Methods
  NameDescription
Public methodAncestors
Returns a collection of all ancestor nodes of this element.
Public methodAncestors(String)
Get Ancestors with matching name
Public methodAncestorsAndSelf
Returns a collection of all ancestor nodes of this element.
Public methodAncestorsAndSelf(String)
Gets all anscestor nodes and the current node
Public methodAppendChild
Adds the specified node to the end of the list of children of this node.
Public methodAppendChildren
Adds the specified node to the end of the list of children of this node.
Public methodStatic memberCanOverlapElement
Determines if an element node can be kept overlapped.
Public methodChildAttributes
Gets all Attributes with name
Public methodClone
Creates a duplicate of the node
Public methodCloneNode(Boolean)
Creates a duplicate of the node.
Public methodCloneNode(String)
Creates a duplicate of the node and changes its name at the same time.
Public methodCloneNode(String, Boolean)
Creates a duplicate of the node and changes its name at the same time.
Public methodCopyFrom(HtmlNode)
Creates a duplicate of the node and the subtree under it.
Public methodCopyFrom(HtmlNode, Boolean)
Creates a duplicate of the node.
Public methodCreateNavigator
Creates a new XPathNavigator object for navigating this HTML node.
Public methodStatic memberCreateNode
Creates an HTML node from a string representing literal HTML.
Public methodCreateRootNavigator
Creates an XPathNavigator using the root of this document.
Public methodDescendantNodes
Gets all Descendant nodes for this node and each of child nodes
Public methodDescendantNodesAndSelf
Returns a collection of all descendant nodes of this element, in document order
Public methodDescendants
Gets all Descendant nodes in enumerated list
Public methodDescendants(String)
Get all descendant nodes with matching name
Public methodDescendantsAndSelf
Returns a collection of all descendant nodes of this element, in document order
Public methodDescendantsAndSelf(String)
Gets all descendant nodes including this node
Public methodElement
Gets first generation child node matching name
Public methodElements
Gets matching first generation child nodes matching name
Public methodGetAttributeValue(String, Boolean)
Helper method to get the value of an attribute of this node. If the attribute is not found, the default value will be returned.
Public methodGetAttributeValue(String, Int32)
Helper method to get the value of an attribute of this node. If the attribute is not found, the default value will be returned.
Public methodGetAttributeValue(String, String)
Helper method to get the value of an attribute of this node. If the attribute is not found, the default value will be returned.
Public methodInsertAfter
Inserts the specified node immediately after the specified reference node.
Public methodInsertBefore
Inserts the specified node immediately before the specified reference node.
Public methodStatic memberIsCDataElement
Determines if an element node is a CDATA element node.
Public methodStatic memberIsClosedElement
Determines if an element node is closed.
Public methodStatic memberIsEmptyElement
Determines if an element node is defined as empty.
Public methodStatic memberIsOverlappedClosingElement
Determines if a text corresponds to the closing tag of an node that can be kept overlapped.
Public methodPrependChild
Adds the specified node to the beginning of the list of children of this node.
Public methodPrependChildren
Adds the specified node list to the beginning of the list of children of this node.
Public methodRemove
Removes node from parent collection
Public methodRemoveAll
Removes all the children and/or attributes of the current node.
Public methodRemoveAllChildren
Removes all the children of the current node.
Public methodRemoveChild(HtmlNode)
Removes the specified child node.
Public methodRemoveChild(HtmlNode, Boolean)
Removes the specified child node.
Public methodReplaceChild
Replaces the child node oldChild with newChild node.
Public methodSelectNodes
Selects a list of nodes matching the XPath expression.
Public methodSelectSingleNode
Selects the first XmlNode that matches the XPath expression.
Public methodSetAttributeValue
Helper method to set the value of an attribute of this node. If the attribute is not found, it will be created automatically.
Public methodWriteContentTo
Saves all the children of the node to a string.
Public methodWriteContentTo(TextWriter)
Saves all the children of the node to the specified TextWriter.
Public methodWriteTo
Saves the current node to a string.
Public methodWriteTo(TextWriter)
Saves the current node to the specified TextWriter.
Public methodWriteTo(XmlWriter)
Saves the current node to the specified XmlWriter.
Top
Fields
  NameDescription
Public fieldStatic memberElementsFlags
Gets a collection of flags that define specific behaviors for specific element nodes. The table contains a DictionaryEntry list with the lowercase tag name as the Key, and a combination of HtmlElementFlags as the Value.
Public fieldStatic memberHtmlNodeTypeNameComment
Gets the name of a comment node. It is actually defined as '#comment'.
Public fieldStatic memberHtmlNodeTypeNameDocument
Gets the name of the document node. It is actually defined as '#document'.
Public fieldStatic memberHtmlNodeTypeNameText
Gets the name of a text node. It is actually defined as '#text'.
Top
See Also