Dim oAnalyzer As New HTMLDocAnalyzer
Dim oItem As HTMLAObject
Dim i As Long
oAnalyzer.Analyze "TEST.HTML"
For i = 1 To oAnalyzer.Count
Set oItem = oAnalyzer.GetObject(i)
' process oItem
Next
ConvertCharRefs | Returns or sets the handling of character references. True converts character references
to text objects. |
Count | Returns the number of HTML objects in the HTML document. |
File | Returns the name of the analyzed HTML file. |
SN | Returns the serial number. |
UpperCaseAttributeNames | Returns or sets upper-case conversion for attribute names. |
UpperCaseTagNames | Returns or sets upper-case conversion for tag names. |
Analyze |
Analyzes an HTML file and divides it into a sequence of HTML objects: start/end tags, text, decimal character references, hexadecimal character references (HTML 4.0 feature), named character references, line breaks, DOCTYPE declarations, comments and errors. Syntax:
Return Value: Note: |
Clear | Frees any memory used by the current HTML file. Syntax: Clear( ) |
FilterAdd |
Restricts analyzing to specific HTML object types. Syntax:
objectType can be one of the following: Note: SHTAObjectTypeError is always enabled. |
FilterClear | Enables all HTML object types. Syntax: FilterClear( ) |
GetObject |
Returns a reference to an HTML object. Syntax:
Note: |
Register |
Registers the HTMLAnalyzer Toolkit on the computer. Syntax:
|
TagName |
Returns the name of a start or end tag without creating a COM object. Syntax:
|
TagNameFilterAdd |
Restricts start tags and end tags by name. The filter is NOT case sensitive. Syntax:
|
TagNameFilterClear | Enables ALL start tags and end tags. Syntax: TagNameFilterClear( ) |
Type |
Returns the type of an HTML object without creating a COM object. Syntax:
Return Value: See Also: |
Dim oItem As HTMLAObject
Dim i As Long
If oItem.Type = SHTAObjectTypeTagStart Then
For i = 1 To oItem.AttributeCount
Debug.Print oItem.AttributeName(i)
Next
End If
AttributeCount | Returns the number of attributes. |
||||||||||||||||||||||||
Data | Returns the associated data.
|
||||||||||||||||||||||||
DocTypeParamCount | Returns the number of DOCTYPE parameters. |
||||||||||||||||||||||||
ErrorNumber | Returns an error number. Only error objects can return a value other than SHTAOErrNo. Return Value: SHTAOErrNo SHTAOErrParseError SHTAOErrCriticalParseError SHTAOErrInvalidToken SHTAOErrInvalidCharRef SHTAOErrFile |
||||||||||||||||||||||||
IsEmptySign | Returns true if the start tag contains an empty element sign "/>" (HTML
4.0 feature). |
||||||||||||||||||||||||
Line | Returns the starting line. |
||||||||||||||||||||||||
Offset | Returns the starting offset. |
||||||||||||||||||||||||
Type | Returns the object type. Return Value: SHTAObjectTypeUnknown SHTAObjectTypeTagStart SHTAObjectTypeTagEnd SHTAObjectTypeText SHTAObjectTypeDocType SHTAObjectTypeCharRefNumDec SHTAObjectTypeCharRefNumHex SHTAObjectTypeCharRefName SHTAObjectTypeComment SHTAObjectTypeEol SHTAObjectTypeError |
AttributeFind |
Returns the position of an attribute or 0 if it does not exist. Syntax:
|
AttributeIsBoolean |
Returns true if an attribute is of type boolean. Syntax:
|
AttributeName |
Returns the attribute name. Syntax:
|
AttributeUnitData |
Returns the unit data of an attribute. Syntax:
|
AttributeUnitType |
Returns the unit type of an attribute. Syntax:
Return Value: |
AttributeValue |
Returns an attribute value using an attribute name. The value does not contain type-specific decoration (#, ", ') and unit information (%,*). Syntax:
|
AttributeValueData |
Returns the value data of an attribute. The data does not contain type-specific decoration (#, ", ') and unit information (%,*). Syntax:
|
AttributeValueType |
Returns the value type of an attribute. Syntax:
Return Value: |
DocTypeParamType |
Returns the parameter type. Syntax:
Return Value: |
DocTypeParamValue |
Returns the parameter value. Type-specific decoration is removed. Syntax:
|
Dim oAnalyzer As New URLAnalyzer
Dim i As Long
oAnalyzer.Analyze( "http://www.software-systems.de" )
For i = 1 To oAnalyzer.Count
Debug.Print oAnalyzer.ComponentData(i)
Next
ConvertEscapes | Returns or sets handling of URL escape sequences. True, '%xx', '+' and '%%' are converted. |
Count | Returns the number of URL components. |
Data | Returns the original URL text |
SplitNet | Returns or sets splitting of network locations. True, the analyzer splits "user:password@host:port"
into separate components. |
Analyze |
Analyzes an URL string and divides it into components. URLs are processed from left to right. Syntax:
Return Value: |
||||||||||||||||||
ComponentData |
Returns the component data of an entry. Any type-specific decoration Syntax:
|
||||||||||||||||||
ComponentType |
Returns the component type of an entry. Syntax:
Return Value: |
||||||||||||||||||
Join |
Helper method that takes two URLs and generates a new one. Level controls ('.', '..') are processed accordingly. Syntax:
Return Value:
Note: |
||||||||||||||||||
URLDecode |
Helper method that decodes URL escapes. Syntax:
|
Dim oAnalyzer As New ValueAnalyzer
Dim i As Long
oAnalyzer.Analyze( "10%, 50%" )
For i = 1 To oAnalyzer.Count
Debug.Print oAnalyzer.ValueData(i)
Next
Count | Returns the number of values. |
Data | Returns the original text. |
Separator | Returns or sets the separator dividing values. The default is ASCII 44 for ',' |
Analyze |
Analyzes a string and divides it into separate values. The string may contain serveral delimited values. The default delimiter is the character ',' and can be changed with the property Separator. Syntax:
Return Value: |
UnitData |
Returns the unit data of an entry. Syntax:
|
UnitType |
Returns the unit type of an entry. Syntax:
Return Value: |
ValueData |
Returns the value data of an entry. Syntax:
|
ValueType |
Returns the value type of an entry. Syntax:
Return Value: |
Symbol | Description | Value |
SHTAObjectTypeUnknown | Unknown object | 0 |
SHTAObjectTypeTagStart | Start tag | 1 |
SHTAObjectTypeTagEnd | End tag | 2 |
SHTAObjectTypeText | Normal text | 3 |
SHTAObjectTypeDocType | DOCTYPE declaration | 4 |
SHTAObjectTypeCharRefNumDec | Decimal character reference | 5 |
HTAObjectTypeCharRefNumHex | SHTAObjectTypeCharRefNumHex Hexadecimal character reference (HTML 4.0 feature) | 6 |
SHTAObjectTypeCharRefName | Named character reference | 7 |
SHTAObjectTypeComment | Normal comment | 8 |
SHTAObjectTypeEol | End of line | 9 |
SHTAObjectTypeError | Error | 10 |
Symbol | Description | Value |
SHTAValueTypeNull | No value | 0 |
SHTAValueTypeNumber | Decimal number | 1 |
SHTAValueTypeHexNumber | Hexadecimal number | 2 |
SHTAValueTypeString | Text within double or single quotes | 3 |
SHTAValueTypeText | Text without quotes | 4 |
Symbol | Description | Value |
SHTAUnitTypeNull | No type information | 0 |
SHTAUnitTypePercent | Percent (%) | 1 |
SHTAUnitTypeRel | Relative (*) | 2 |
SHTAUnitTypeUnknown | Unknown type | 3 |
Symbol | Description | Value |
SHTAOErrNo | Success | 0 |
SHTAOErrParseError | Parse error | 1 |
SHTAOErrCriticalParseError | Unrecoverable parse error | 2 |
SHTAOErrInvalidToken | Invalid token found | 3 |
SHTAOErrInvalidCharRef | Character reference is invalid, e.g. wrong name | 4 |
SHTAOErrFile | Problem with HTML file | 5 |
Symbol | Description | Value |
SHTAErrNo | Success | 0 |
SHTAErrFileError | OS file error | 1 |
SHTAErrParseError | Parse error detected | 2 |
SHTAErrInvalidToken | Invalid token found during parsing | 3 |
SHTAErrMemoryError | Not enough memory | 4 |
SHTAErrUnknownErro | Error cause is unknown | 5 |
SHTAErrLicenseError | Version is not licensed | 6 |
SHTAErrParserError | Problem with parser engine | 7 |