Ns tagelement

From AOLserver Wiki
Revision as of 04:11, 17 February 2006 by 72.73.16.252 (talk)
Jump to navigation Jump to search

Man page: http://aolserver.com/docs/tcl/ns_tagelement.html


NAME

ns_tagelement - Find the value of an attribute in an HTML element.

SYNOPSIS

ns_tagelement tag attribute

DESCRIPTION

This command takes a string containing an HTML element, tag, and searches it for the specified attribute. If the attribute is found, its value is returned. If the attribute is not found, an empty string is returned. If the attribute's value is surrounded by double quotes, they will be removed.

EXAMPLES

% set tag {<img height=150 border="0" class="c1 c2" src='me.jpg'>}
<img height=150 border="0" class="c1 c2" src='me.jpg'>

% ns_tagelement $tag id

% ns_tagelement $tag border
150

% ns_tagelement $tag class 
c1 c2

% ns_tagelement $tag src
'me.jpg'

NOTES

Is not removing single quotes surrounding the value a bug?

SEE ALSO

ns_tagelementset

Category Documentation - Category Core Tcl API