HtmlNode Methods

Html Agility Pack

Collapse imageExpand ImageCopy imageCopyHover image

The HtmlNode type exposes the following members.

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 methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
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 methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
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.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
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 methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
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.

See Also