-
Notifications
You must be signed in to change notification settings - Fork 2
_HTMLParser_GetFirstStartTag Function
Anders Pedersen edited this page Jan 8, 2018
·
2 revisions
TokenListToken* _HTMLParser_GetFirstStartTag(
POINTER $pItem,
STRING $sHTML
)
Returns the first found start tag
Name | Description | Type |
---|---|---|
$pItem | TokenListToken structure pointer | Pointer |
$sHTML | The HTML | String |
Intended for use with _HTMLParser(s) $tagTokenListList.First due to first element most likely won't be a start tag, required for most functions
;_HTMLParser_GetFirstStartTag 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)
$pItem = _HTMLParser_GetFirstStartTag($tTokenList.First, $sHTML);finds first start tag. In this example it will be <html>