xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

THtmlIsValid()

Validates a HTML tag name and attribute.

Syntax

THtmlIsValid( <cTagName>, [<cAttrName>] ) --> lIsValid

Arguments

<cTagName>
This is a character string holding the tag name of an HTML tag.
<cAttrName>
This is an optional character string holding the attribute name of an HTML tag

Return

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.

Info

See also:THtmlCleanup(), THtmlDocument(), THtmlInit(), THtmlNode()
Category: HTML functions , xHarbour extensions
Source:tip\thtml.prg
LIB:xhb.lib
DLL:xhbdll.dll

Example

// 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

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe