-
Notifications
You must be signed in to change notification settings - Fork 2
_HTMLParser Function
Anders Pedersen edited this page Jan 5, 2018
·
1 revision
TokenListList _HTMLParser(
STRING $sHTML
)
Parses and returns as much HTML as possible
Name | Description | Type |
---|---|---|
$sHTML | The HTML | String |
@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.
;_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)