How the Tag Finder Works

A Tag Finder can be configured using the following properties:

Find Where:

In this property, you can specify where to find the tag relative to a named tag. The default value is "Anywhere in Page", meaning that named tags are not used to find the tag.

Tag Path:

In this property, you can specify the tag path as described in the previous section.

Attribute Name:

In this property, you can specify that the tag must have a specific attribute, for example "align".

Attribute Value:

In this property, you can specify that the tag must have an attribute with a specific value. If the Attribute Name property is set, the attribute value is bound to that specific attribute name.

  • "Equals Text" specifies that the attribute value must match a specified text. Note that the text must match the entire attribute value.

  • "Containing Text" specifies that the attribute value must contain the specified text.

  • "Pattern" specifies that the attribute value must match a pattern. Note that the pattern must match the entire attribute value.

Tag Pattern:

In this property, you can specify a pattern that the tag must match (including all tags inside it), for example ".*<b>.*Stock Quotes.*</b>.*". Some caution should be observed in using this property, since it can have considerable impact on the performance of you robot. This is because the "Tag Pattern" may be applied many times throughout a page just to find the one tag that it matches. One way to try and avoid this is to choose "Text Only" for the "Match Against" property.

Match Against:

In this property, you can specify that the "Tag Pattern" should match only the text or the entire HTML of the tag. The default is to match only the text because this is normally much faster.

Tag Depth:

This property determines which tag to use if matching tags are contained inside each other. The default value is "Any Depth" which accepts all matching tags. If you select "Outermost Tag", only the outermost tags are accepted, and similarly, if you select "Innermost Tag", only the innermost tags are accepted.

Tag Number:

This property determines which tag to use if more than one tag match the tag path and the other criteria. You specify the number of the tag to use, either counting forwards from the first tag or counting backwards from the last tag that matches.

For example, if you set the tag path to "table", the Tag Attribute property to "align=center", and the Tag Pattern property to ".*Business News.*", then the Tag Finder would locate the first <table>-tag that is center aligned and that contains the text "Business News".