• Tutorials
  • Api Documentation
  • Download
  • Credits
Show / Hide Table of Contents
  • AutoCheck.Core
    • Output
    • Output.Log
    • Output.Style
    • Output.Type
    • Script
    • Script.ExecutionMode
    • Utils
    • Utils.OS
  • AutoCheck.Core.Connectors
    • Atom
    • Base
    • Compressed
    • Css
    • Csv
    • CsvDocument
    • Dmoj
    • GDrive
    • Html
    • Math
    • Odoo
    • Operator
    • PlainText
    • PlainText.PlainTextDocument
    • Postgres
    • Rss
    • Shell
    • TextStream
    • Xml
    • Xml.XmlNodeType
  • AutoCheck.Core.CopyDetectors
    • Base
    • Base.Mode
    • Css
    • Html
    • PlainText
    • PlainText.File
    • SourceCode
    • SqlLog
    • Xml
  • AutoCheck.Core.Events
    • LogUpdateEventArgs
    • StatusUpdateEventArgs
    • StatusUpdateEventArgs.ExecutionEvent
  • AutoCheck.Core.Exceptions
    • ArgumentInvalidException
    • ArgumentNotFoundException
    • ConfigFileMissingException
    • ConnectionInvalidException
    • ConnectorInvalidException
    • ConnectorNotFoundException
    • DocumentInvalidException
    • DownloadFailedException
    • ItemNotFoundException
    • PorpertyNotFoundException
    • QueryInvalidException
    • RegexInvalidException
    • ResultMismatchException
    • ScriptInvalidException
    • ScriptNotFoundException
    • StyleInvalidException
    • StyleNotAppliedException
    • StyleNotFoundException
    • TableInconsistencyException
    • VariableInvalidException
    • VariableNotFoundException
  • Google.DiffMatchPatch
    • Diff
    • DiffMatchPatch
    • Operation
    • Patch

Class Html

Allows in/out operations and/or data validations with web files (html, css, etc.).

Inheritance
System.Object
AutoCheck.Core.Connector
Html
Implements
System.IDisposable
Inherited Members
AutoCheck.Core.Connector.CurrentOS
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: AutoCheck.Core.Connectors
Assembly: AutoCheck.dll
Syntax
public class Html : Connector, IDisposable

Constructors

| Improve this Doc View Source

Html(String, String)

Creates a new connector instance.

Declaration
public Html(string path, string file)
Parameters
Type Name Description
System.String path

The folder containing the web files.

System.String file

HTML file name.

Properties

| Improve this Doc View Source

HtmlDoc

The HTML document content.

Declaration
public HtmlDocument HtmlDoc { get; }
Property Value
Type Description
HtmlAgilityPack.HtmlDocument
| Improve this Doc View Source

Raw

The original HTML file content (unparsed).

Declaration
public string Raw { get; }
Property Value
Type Description
System.String

Methods

| Improve this Doc View Source

ContentLength(HtmlNode, String)

The length of a node content, sum of all of them i there's more than one.

Declaration
public int ContentLength(HtmlNode root, string xpath)
Parameters
Type Name Description
HtmlAgilityPack.HtmlNode root

Root node from where the XPath expression will be evaluated.

System.String xpath

XPath expression.

Returns
Type Description
System.Int32

Node content's length.

| Improve this Doc View Source

ContentLength(String)

The length of a node content, sum of all of them if there's more than one.

Declaration
public int ContentLength(string xpath)
Parameters
Type Name Description
System.String xpath

XPath expression.

Returns
Type Description
System.Int32

Node content's length.

| Improve this Doc View Source

CountNodes(HtmlNode, String)

Count how many nodes of this kind are within the document, ideal for count groups of radio buttons or checkboxes.

Declaration
public int CountNodes(HtmlNode root, string xpath)
Parameters
Type Name Description
HtmlAgilityPack.HtmlNode root

Root node from where the XPath expression will be evaluated.

System.String xpath

XPath expression.

Returns
Type Description
System.Int32

Amount of nodes.

| Improve this Doc View Source

CountNodes(String)

Count how many nodes of this kind are within the document.

Declaration
public int CountNodes(string xpath)
Parameters
Type Name Description
System.String xpath

XPath expression.

Returns
Type Description
System.Int32

Amount of nodes.

| Improve this Doc View Source

CountSiblings(HtmlNode, String)

Count how many nodes are siblings, grouped by father.

Declaration
public int[] CountSiblings(HtmlNode root, string xpath)
Parameters
Type Name Description
HtmlAgilityPack.HtmlNode root

Root node from where the XPath expression will be evaluated.

System.String xpath

XPath expression.

Returns
Type Description
System.Int32[]

Each group means how many nodes are siblings between each other.

| Improve this Doc View Source

CountSiblings(String)

Count how many nodes are siblings, grouped by father.

Declaration
public int[] CountSiblings(string xpath)
Parameters
Type Name Description
System.String xpath

XPath expression.

Returns
Type Description
System.Int32[]

Each group means how many nodes are siblings between each other.

| Improve this Doc View Source

Dispose()

Disposes the object releasing its unmanaged properties.

Declaration
public override void Dispose()
Overrides
AutoCheck.Core.Connector.Dispose()
| Improve this Doc View Source

GetRelatedLabels(HtmlNode, String)

Returns the label nodes related to the xpath resulting nodes.

Declaration
public Dictionary<HtmlNode, HtmlNode[]> GetRelatedLabels(HtmlNode root, string xpath)
Parameters
Type Name Description
HtmlAgilityPack.HtmlNode root

Root node from where the XPath expression will be evaluated.

System.String xpath

XPath expression.

Returns
Type Description
System.Collections.Generic.Dictionary<HtmlAgilityPack.HtmlNode, HtmlAgilityPack.HtmlNode[]>

Dictonary with key-pair values, where the key is the main field node, and the value is a set of its related label nodes.

| Improve this Doc View Source

GetRelatedLabels(String)

Returns the label nodes related to the xpath resulting nodes.

Declaration
public Dictionary<HtmlNode, HtmlNode[]> GetRelatedLabels(string xpath)
Parameters
Type Name Description
System.String xpath

XPath expression.

Returns
Type Description
System.Collections.Generic.Dictionary<HtmlAgilityPack.HtmlNode, HtmlAgilityPack.HtmlNode[]>

Dictonary with key-pair values, where the key is the main field node, and the value is a set of its related label nodes.

| Improve this Doc View Source

GroupSiblings(HtmlNode, String)

Get a set of siblings, grouped by father.

Declaration
public HtmlNode[][] GroupSiblings(HtmlNode root, string xpath)
Parameters
Type Name Description
HtmlAgilityPack.HtmlNode root

Root node from where the XPath expression will be evaluated.

System.String xpath

XPath expression.

Returns
Type Description
HtmlAgilityPack.HtmlNode[][]

A list of node groups.

| Improve this Doc View Source

GroupSiblings(String)

Get a set of siblings, grouped by father.

Declaration
public HtmlNode[][] GroupSiblings(string xpath)
Parameters
Type Name Description
System.String xpath

XPath expression.

Returns
Type Description
HtmlAgilityPack.HtmlNode[][]

A list of node groups.

| Improve this Doc View Source

SelectNodes(HtmlNode, String)

Requests for a set of nodes.

Declaration
public List<HtmlNode> SelectNodes(HtmlNode root, string xpath)
Parameters
Type Name Description
HtmlAgilityPack.HtmlNode root

Root node from where the XPath expression will be evaluated.

System.String xpath

XPath expression.

Returns
Type Description
System.Collections.Generic.List<HtmlAgilityPack.HtmlNode>

A list of nodes.

| Improve this Doc View Source

SelectNodes(String)

Requests for a set of nodes.

Declaration
public List<HtmlNode> SelectNodes(string xpath)
Parameters
Type Name Description
System.String xpath

XPath expression.

Returns
Type Description
System.Collections.Generic.List<HtmlAgilityPack.HtmlNode>

A list of nodes.

| Improve this Doc View Source

ValidateHtml5AgainstW3C()

Validates the currently loaded HTML document against the W3C public API. Throws an exception if the document is invalid.

Declaration
public void ValidateHtml5AgainstW3C()
| Improve this Doc View Source

ValidateTable(HtmlNode, String)

Checks if a table's amount of columns is consistent within all its rows. Throws an exception if it's inconsistent.

Declaration
public void ValidateTable(HtmlNode root, string xpath)
Parameters
Type Name Description
HtmlAgilityPack.HtmlNode root

Root node from where the XPath expression will be evaluated.

System.String xpath

XPath expression.

| Improve this Doc View Source

ValidateTable(String)

Checks if a table's amount of columns is consistent within all its rows. Throws an exception if it's inconsistent.

Declaration
public void ValidateTable(string xpath)
Parameters
Type Name Description
System.String xpath

XPath expression.

Implements

System.IDisposable
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX