The tagdata( function extracts the body of the specified tag (usually an HTML tag) in the text. See Tag Parsing for more information on HTML tags.
Parameters
This function has four parameters:text – is the item of text that contains the data you want to extract.
header – is the text that you want to use as a tag header. For example, if you want to extract an HTML tag, use "<"
as the header. If you wanted to extract a bold text item you would use "<B>"
as the header. (Note: Upper or lower case is ignored, so "<b>"
will also work.)
trailer – is the text that you want to use as a tag trailer. For example, if you want to extract an HTML tag, use ">"
as the trailer. If you wanted to extract a bold text item you would use"</B>"
as the trailer. (Note: Upper or lower case is ignored, so "</b>"
will also work.)
item – is the number of the tag you want to extract. For example, suppose you are using "<"
and ">"
as the tag header and tag trailer. Using an item number of 1 will extract the first tag, 2 the second tag, 3 the third tag, etc.
Description
The tagdata( function extracts the body of the specified tag (usually an HTML tag) in the text. (See Tag Parsing for more information on HTML tags.) This function returns the contents (text) of the specified tag. The headers and trailers themselves are not included as part of the extracted text.
This example assumes you have a field or variable named myPage that contains an HTML page. The example will display the title of the page.
message tagdata(myPage,"<title>","</title>",1)
See Also
History
Version | Status | Notes |
10.0 | No Change | Carried over from Panorama 6.0 |