Skip to content

_HTMLParser Function

Anders Pedersen edited this page Jan 5, 2018 · 1 revision

Syntax

TokenListList _HTMLParser(
    STRING $sHTML
)

Description

Parses and returns as much HTML as possible

Parameters

Name Description Type
$sHTML The HTML String

Remarks

@extended is set to indicate where no more matches could be parsed.

To check for errors check @extended with string length or check if $tagTokenListList.First is equals zero.

Note: Currently this function uses the same $tagTokenListList structure every time it is called. Calling this function multiple times will add the new results to the previous results. This may have unexspected results.

Example

;_HTMLParser Function Demo
#include <HTMLParser.au3>

$sHTML = "<!DOCTYPE html><html><head><title>Demo page</title></head></head><body>Visit <a href="https://github.com/genius257/">genius257</a> on GitHub</body></html>"

$tTokenList = _HTMLParser($sHTML)
Clone this wiki locally