array
$GLOBALS[gHtmlParser]['parseModes']
[line 92]
Modes the parser is set to while looping through the HTML
- pmInTag: We are in a tag between < and >
- pmComment: We are parsing in a comment between <!-- -->
- pmNormal: We are parsing outside of tags
- pmScript: We are parsing inside script
Default value: array( 'pmComment', 'pmInTag', 'pmNormal', 'pmScript' )
array
$GLOBALS[gHtmlParser]['parseOptions']
[line 102]
Parser options controlling how different szenarios are handeled. These options are passed with an OR operator. Example: htmlNode->parseHtml( $myHtml, poRemoveCRLF | poTrimText );
- poRemoveCRLF: CR or CRLF are removed from the text and replaced with SPACE
- poTrimText: The text elements are trimmed
- poNone: None of the parse options are set
Default value: array( 0 => 'poNone', 1 => 'poRemoveCRLF', 2 => 'poTrimText' )
array
$GLOBALS[gHtmlParser]['tagProperties']
[line 112]
Tag properties used when analysing tag names, types and data
- tName: Name of tag as string. !-- is used for comments. !DOCTYPE is used for document type information
- tType: Type of tag using tag type globals
- tData: Data portion of tag. This can be attributes (before parseAttribues() is called), comment of document type information
Default value: array( 'tName', 'tType', 'tData' )
array
$GLOBALS[gHtmlParser]['tagTypes']
[line 81]
Tag types for the HTML nodes
- ttRoot: Root node as specified in rootTagName used during parsing
- ttUnknown: Fallback type if tag cannot be identified
- ttComment: Comment tag in the format of <!-- comment -->
- ttDocType: Document type tag in the format of <!DOCTYPE ...>. Identification of this tag is case insensitive
- ttText: Tag used to store plain text
- ttStart: Tag type used during parsing when the format is <name> containing no / at the beginning or end
- ttEnd: Tag type used during parsing when the format is </name>. The parser will try to find the matching start tag and change it to ttNormal
- ttNormal: Tag type used for "normal" hierarchical tags in the format of <tagName></tagName>
- ttSingle: Tag type used for tags with a / at the end. Example: <br/>
- ttSimple: Tag type used for tags that looked like start tags but did not have an end tag. Example: <hr>
Default value: array( 'ttRoot', 'ttUnknown', 'ttComment', 'ttDocType', 'ttText', 'ttStart', 'ttEnd', 'ttNormal', 'ttSingle', 'ttSimple' )
array
$GLOBALS[gHtmlParser]['walkAbort']
[line 122]
walkDown() resul constants to control the continuation or abort of DOM walk
- wdContinue: Continue to walk the DOM
- wdAbortBranch: Abort walking the current branch but continue otherwise
- wdAbort: Abort the walk immediately
Default value: array( 'wdContinue', 'wdAbortBranch', 'wdAbort' )