You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)