Click or drag to resize

HtmlDocument Class

Represents a complete HTML document.
Inheritance Hierarchy
SystemObject
  WorkflowGen.My.HtmlAgilityPackHtmlDocument

Namespace:  WorkflowGen.My.HtmlAgilityPack
Assembly:  WorkflowGen.My (in WorkflowGen.My.dll) Version: 8.0.6.0 (8.0.6.20210916)
Syntax
public class HtmlDocument : IXPathNavigable

The HtmlDocument type exposes the following members.

Constructors
  NameDescription
Public methodHtmlDocument
Creates an instance of an HTML document.
Top
Properties
  NameDescription
Public propertyCheckSum
Gets the document CRC32 checksum if OptionComputeChecksum was set to true before parsing, 0 otherwise.
Public propertyDeclaredEncoding
Gets the document's declared encoding. Declared encoding is determined using the meta http-equiv="content-type" content="text/html;charset=XXXXX" html node.
Public propertyDocumentNode
Gets the root node of the document.
Public propertyEncoding
Gets the document's output encoding.
Public propertyParseErrors
Gets a list of parse errors found in the document.
Public propertyRemainder
Gets the remaining text. Will always be null if OptionStopperNodeName is null.
Public propertyRemainderOffset
Gets the offset of Remainder in the original Html text. If OptionStopperNodeName is null, this will return the length of the original Html text.
Public propertyStreamEncoding
Gets the document's stream encoding.
Top
Methods
  NameDescription
Public methodCreateAttribute(String)
Creates an HTML attribute with the specified name.
Public methodCreateAttribute(String, String)
Creates an HTML attribute with the specified name.
Public methodCreateComment
Creates an HTML comment node.
Public methodCreateComment(String)
Creates an HTML comment node with the specified comment text.
Public methodCreateElement
Creates an HTML element node with the specified name.
Public methodCreateNavigator
Creates a new XPathNavigator object for navigating this HTML document.
Public methodCreateTextNode
Creates an HTML text node.
Public methodCreateTextNode(String)
Creates an HTML text node with the specified text.
Public methodDetectEncoding(Stream)
Detects the encoding of an HTML stream.
Public methodDetectEncoding(TextReader)
Detects the encoding of an HTML text provided on a TextReader.
Public methodDetectEncoding(String)
Detects the encoding of an HTML file.
Public methodDetectEncodingAndLoad(String)
Detects the encoding of an HTML document from a file first, and then loads the file.
Public methodDetectEncodingAndLoad(String, Boolean)
Detects the encoding of an HTML document from a file first, and then loads the file.
Public methodDetectEncodingHtml
Detects the encoding of an HTML text.
Public methodGetElementbyId
Gets the HTML node with the specified 'id' attribute value.
Public methodStatic memberGetXmlName
Gets a valid XML name.
Public methodStatic memberHtmlEncode
Applies HTML encoding to a specified string.
Public methodStatic memberIsWhiteSpace
Determines if the specified character is considered as a whitespace character.
Public methodLoad(Stream)
Loads an HTML document from a stream.
Public methodLoad(TextReader)
Loads the HTML document from the specified TextReader.
Public methodLoad(String)
Loads an HTML document from a file.
Public methodLoad(Stream, Boolean)
Loads an HTML document from a stream.
Public methodLoad(Stream, Encoding)
Loads an HTML document from a stream.
Public methodLoad(String, Boolean)
Loads an HTML document from a file.
Public methodLoad(String, Encoding)
Loads an HTML document from a file.
Public methodLoad(Stream, Encoding, Boolean)
Loads an HTML document from a stream.
Public methodLoad(String, Encoding, Boolean)
Loads an HTML document from a file.
Public methodLoad(Stream, Encoding, Boolean, Int32)
Loads an HTML document from a stream.
Public methodLoad(String, Encoding, Boolean, Int32)
Loads an HTML document from a file.
Public methodLoadHtml
Loads the HTML document from the specified string.
Public methodSave(Stream)
Saves the HTML document to the specified stream.
Public methodSave(StreamWriter)
Saves the HTML document to the specified StreamWriter.
Public methodSave(TextWriter)
Saves the HTML document to the specified TextWriter.
Public methodSave(String)
Saves the mixed document to the specified file.
Public methodSave(XmlWriter)
Saves the HTML document to the specified XmlWriter.
Public methodSave(Stream, Encoding)
Saves the HTML document to the specified stream.
Public methodSave(String, Encoding)
Saves the mixed document to the specified file.
Top
Fields
  NameDescription
Public fieldOptionAddDebuggingAttributes
Adds Debugging attributes to node. Default is false.
Public fieldOptionAutoCloseOnEnd
Defines if closing for non closed nodes must be done at the end or directly in the document. Setting this to true can actually change how browsers render the page. Default is false.
Public fieldOptionCheckSyntax
Defines if non closed nodes will be checked at the end of parsing. Default is true.
Public fieldOptionComputeChecksum
Defines if a checksum must be computed for the document while parsing. Default is false.
Public fieldOptionDefaultStreamEncoding
Defines the default stream encoding to use. Default is System.Text.Encoding.Default.
Public fieldOptionExtractErrorSourceText
Defines if source text must be extracted while parsing errors. If the document has a lot of errors, or cascading errors, parsing performance can be dramatically affected if set to true. Default is false.
Public fieldOptionExtractErrorSourceTextMaxLength
Defines the maximum length of source text or parse errors. Default is 100.
Public fieldOptionFixNestedTags
Defines if LI, TR, TH, TD tags must be partially fixed when nesting errors are detected. Default is false.
Public fieldOptionOutputAsXml
Defines if output must conform to XML, instead of HTML.
Public fieldOptionOutputOptimizeAttributeValues
Defines if attribute value output must be optimized (not bound with double quotes if it is possible). Default is false.
Public fieldOptionOutputOriginalCase
Defines if name must be output with it's original case. Useful for asp.net tags and attributes
Public fieldOptionOutputUpperCase
Defines if name must be output in uppercase. Default is false.
Public fieldOptionReadEncoding
Defines if declared encoding must be read from the document. Declared encoding is determined using the meta http-equiv="content-type" content="text/html;charset=XXXXX" html node. Default is true.
Public fieldOptionStopperNodeName
Defines the name of a node that will throw the StopperNodeException when found as an end node. Default is null.
Public fieldOptionUseIdAttribute
Defines if the 'id' attribute must be specifically used. Default is true.
Public fieldOptionWriteEmptyNodes
Defines if empty nodes must be written as closed during output. Default is false.
Top
See Also