getAttValue[ForStartTag]() (tick_24Validator Engine Only)

string getAttValue(int or string $index)

Returns the attribute value of an attribute of the tag, specified by the attribute index $index. The first attribute value has an index of 1, and is the attribute value for the attribute that also has an index of 1. An index of 0 is the value attached to the tag name which generally should not exist.

The attribute value returned is the value after the character references have been replaced with the actual characters.

Generates an error if the attribute at $index does not exist, because if the attribute doesn't exist, then it can't have a value.

In v11.9914 and above, $index may also be a string that is the attribute name (case-insensitive)

See also: getAttValueEx()

string getAttValueForStartTag(int or string $index[, int $flags])

getAttValueForStartTag() is similar to getAttValue() but can also be used in an end tag program to get the attribute value of an attribute of the corresponding start tag, specified by the attribute index $index; may require that runProgram(21) be used in the start tag name program (New v11.0112)

$flags for getAttValueForStartTag() (optional)

4 - trim preceding and trailing spaces

8 - don't generate an error if the attribute at $index does not exist, instead just return an empty string (New v15.00)

In v14.9915 and above, $index may also be a string that is the attribute name (case-insensitive)