Parse
HTML Text Object |
Parse
HTML Text Object Version 2.00 |
Description
Returns true if the last parsed text string returned by GetParsedText if it is a tag.
Syntax
object.ParsedTextIsTag[(tagname)]
The tagname argument is a string expression that can be used to test for a particular tag. A tagname string comparison is case insensitive. This argument is optional.
Remarks
Without the tagname argument ParsedTextIsTag returns true if the last parsed text string returned by GetParsedText if it is a tag. For example, the following code illustrates how ParsedTextIsTag can be used to return only the tags form an HTML text string or file.
strParsedText = objParseHTMLText.GetParsedText
Do While strParsedText <> ""
If objParseHTMLText.ParsedTextIsTag Then
Response.Write Server.HTMLEncode(strParsedText) _
& <br> & vbCRLF
End If
strParsedText = objParseHTMLText.GetParsedText
LoopWith the tagname argument ParsedTextIsTag returns true if the last parsed text string returned by GetParsedText if it is a tag with the same tag name. For example, the following code illustrates how the use of the tagname argument can be used to return only anchor tags (i.e. <a href="http://www.microsoft.com"> from an HTML text string or file.
strParsedText = objParseHTMLText.GetParsedText
Do While strParsedText <> ""
If objParseHTMLText.ParsedTextIsTag("a") Then
Response.Write Server.HTMLEncode(strParsedText) _
& <br> & vbCRLF
End If
strParsedText = objParseHTMLText.GetParsedText
Loop
Copyright (c)
1999-2002 by
Cimarron
Ravine, L.L.C.
All Rights Reserved.