Xbasic

*html_validate Function

Syntax

C *HTML_VALIDATE(C html[,C html_error_format[,C validationLevel]])

Arguments

htmlCharacter

HTML to validate.

html_error_formatCharacter

Defines the error format to use when listing the error. Can include the error message 'E' and line number 'L'.

validationLevelCharacter

Validation level. Defined using *html_validation_level.

Returns

resultCharacter

Returns empty string if HTML is OK, else returns an error message using the format defined in html_error_format.

Description

Internal Use Only. Validate HTML, returns empty string if HTML is OK, else returns errors - format can include 'E'rror and 'L'ocation.

Example

dim str as c =<<%html%
<html>
<title>This is a title</title>
this is some content
<body></body>
</html>
%html%

? *html_validate(str,"L: E")
= "9: title tag must be inside head tag."

Limitations

Internal Use Only