XVCL example - HelloWorld
The purpose of this example is to illustrate how to create a simplest HTML
document using XVCL. The program generates HTML document containing one
<DIV> element with "Hello World!" text in it.
Press F9 to generate HTML content...
Components/classes used in this example
- TJvxHTMLElement - incapsulates <HTML> element.
- TJvxHTMLBody - incapsulates HTML <BODY> element.
- TJvxHTMLDiv - incapslates HTML <DIV> element.
- TJvxXMLGenerator - generates XML/XHTML content from
TJvxHTMLElement object.
Key properties/technologies illustrated in this example
- TJvxHTMLElement.Body - gives easy and typesafe access to an
object incapsulating <BODY> element - child of <HTML> element.
- TJvxHTMLDiv.Parent - used to make <DIV> element a child
of <BODY> element. Note that all XVCL classes that descend from
TJvxNode have this property. It is not unique TJvxHTMLDiv class.
Implementation details
This example creates a template of an HTML document (FHTML). It then creates an
instance of TJvxHTMLDiv class and inserts it into the body of the HTML document.
After that an instance of TJvxXMLGenerator class is used to generate HTML
content using the template. Generated content is saved in Output.htm file.
Copyright © 2000-2001 XVCL