The HTMLTokenizer Class contains the following fields.
attrs | The attributes of a tag. They are valid for these token types: TT_BEGIN_TAG and TT_END_TAG. |
tag | The tag.
Comments: If this is the closing end of a tag, it will not have the leading slash (/) character. This tag is valid for these token types: TT_BEGIN_TAG and TT_END_TAG. |
text | Plain text. They are valid for these token types: TT_TEXT and TT_COMMENT. |
TT_BEGIN_TAG | A token type representing a beginning tag (for example, <H1>). |
TT_COMMENT | A token type representing a comment. |
TT_END_TAG | A token type representing an ending tag (for example, </H1>). |
TT_TEXT | A token type representing the token text. |
type | The last token type read. It can be one of the following: |