| xHarbour Reference Documentation > Function Reference |
![]() |
![]() |
![]() |
Validates a HTML tag name and attribute.
THtmlIsValid( <cTagName>, [<cAttrName>] ) --> lIsValid
The function returns .T. (true) when <cTagName> is a valid HTML tag name. When <cAttrName> is passed, the function checks if the HTML tag has this attribute and returns .T. (true) if the attribute is valid. The return value is .F. (false), when <cTagName> or <cAttrName> are invalid.
| See also: | THtmlCleanup(), THtmlDocument(), THtmlInit(), THtmlNode() |
| Category: | HTML functions , xHarbour extensions |
| Source: | tip\thtml.prg |
| LIB: | xhb.lib |
| DLL: | xhbdll.dll |
// The example displays results of THtmlIsValid()
PROCEDURE Main
THtmlInit()
? THtmlIsValid( "html" ) // result: .T.
? THtmlIsValid( "xml" ) // result: .F.
? THtmlIsValid( "meta", "content" ) // result: .T.
? THtmlIsValid( "table", "content" ) // result: .F.
? THtmlIsValid( "table", "border" ) // result: .T.
THtmlCleanup()
RETURN
http://www.xHarbour.com