PROCESS HTML TAGS

4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next

version 2004


PROCESS HTML TAGS (inputData; outputData)

ParameterTypeDescription
inputDataBLOB | TextData containing HTML tags to process
outputDataBLOB | TextProcessed data

Description

The PROCESS HTML TAGS command causes the processing by 4D of 4D HTML tags contained in the inputData parameter (field or variable of the BLOB or Text type) and returns the resulting data in outputData.

This command lets you carry out processing on tagged HTML code without it being necessary for the Web server to send an HTML page using a command of the SEND HTML BLOB type or that a page suffixed ".shtml" be requested via a URL. It is not even necessary for the 4D Web server to be started.

Pass the data containing the tags to be processed in the inputData parameter. This parameter can be a field or variable of the BLOB or Text type. Keep in mind that it is generally prefereable to use the BLOB type since the number of characters is not limited (32,000 limit for the Text type).

All the HTML tags of 4D are supported (4DVAR, 4DSCRIPT, 4DLOOP, etc.), regardless of the Web server operating mode (contextual or non-contextual) — and even when it is not started.

Note: When using the 4DINCLUDE tag outside the framework of the Web server (Web process):

with 4D in local mode or 4D Server, the default folder is the folder containing the database structure file,

with 4D in remote mode, the default folder is the folder containing the 4D application.

After command execution, the outputData parameter receives the data of the inputData parameter, along with the result of the processing of any 4D HTML tags that it contains, when applicable. If inputData does not contain any 4D HTML tags, the contents of outputData is identical to that of inputData.

The outputData parameter may be a field or a variable, but it must be of the same type as that of the inputData parameter.

This command makes it possible to store the values resulting from the processing of HTML tags in the database before they are sent.

It also permits the parsing of 4D HTML tags apart from the use of the Web server. In particular, you can use it to send e-mail messages in HTML format that contain processing of and/or references to data contained in the database via the 4D Internet Commands.

Example

The following example shows how this command works:

   C_BLOB($in)
   C_BLOB($out)
   C_TEXT($in_text)
   C_TEXT(Var)
   C_TEXT(VarHTML)

   Var:="<B>"
   $in_text:="<p><!--#4DVAR Var--></p>"
   TEXT TO BLOB($in_text;$in;UTF8 Text without length)
   PROCESS HTML TAGS($in;$out)
   VarHTML:=BLOB to text($out;UTF8 Text without length) 
      ` HTMLvar contains <p>&lt;B&gt;</p>

See Also

4D HTML Tags.


4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next