84 lines
4.9 KiB
HTML
84 lines
4.9 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html lang="en-us" xml:lang="en-us">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="security" content="public" />
|
|
<meta name="Robots" content="index,follow" />
|
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
|
<meta name="DC.Type" content="reference" />
|
|
<meta name="DC.Title" content="Using HTMLDocument to create HTML data" />
|
|
<meta name="abstract" content="" />
|
|
<meta name="description" content="" />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="htmldocumentcreatehtml" />
|
|
<meta name="DC.Language" content="en-us" />
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
|
<title>Using HTMLDocument to create HTML data</title>
|
|
</head>
|
|
<body id="htmldocumentcreatehtml"><a name="htmldocumentcreatehtml"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Using HTMLDocument to create HTML data</h1>
|
|
<div><p></p>
|
|
<div class="section"><p>An HTMLDocument functions as a wrapper that holds the information
|
|
necessary to create either HTML or Extensible Stylesheet Language (XSL) Formatting
|
|
Object (FO) source data. When you want to create HTML pages, the HTMLDocument
|
|
class offers you an easier way to group all the required HTML tags.</p>
|
|
</div>
|
|
<div class="section"><h4 class="sectiontitle">Generating HTML source data</h4><p>When creating HTML source,
|
|
HTMLDocument retrieves HTML tags from the HTML objects you have created. You
|
|
can use either HTMLDocument.getTag() to stream all the elements you have defined
|
|
or the getTag() for each individual HTML object.</p>
|
|
<p>HTMLDocument generates
|
|
HTML data as you define it in your Java™ program, so be sure that the resulting
|
|
HTML is complete and correct.</p>
|
|
<p>When you call HTMLDocument.getTag(), the
|
|
HTMLDocument object performs the following actions:</p>
|
|
<ul><li>Generates the opening <HTML> tag. At the end of the data, it generates
|
|
the closing </HTML> tag.</li>
|
|
<li>Converts your HTMLHead and HTMLMeta objects into HTML tags.</li>
|
|
<li>Generates the opening <BODY> tag immediately after the <HEAD> tag.
|
|
At the end of the data, just before the closing </HTML> tag, it generates
|
|
the closing </BODY> tag.<div class="note"><span class="notetitle">Note:</span> If you do not specify a <HEAD> tag, HTMLDocument
|
|
generates the <BODY> tag after the <HTML> tag.</div>
|
|
</li>
|
|
<li>Converts your remaining HTML objects into HTML tags as your program directs.</li>
|
|
</ul>
|
|
<div class="note"><span class="notetitle">Note:</span> HTMLDocument streams the HTML tags as your Java program
|
|
directs, so make sure that you call the tags in the proper order.</div>
|
|
</div>
|
|
<div class="section"><h4 class="sectiontitle">Examples: Using HTMLDocument</h4><p>The following example
|
|
shows how to use HTMLDocument to generate HTML source data (and XSL FO source):</p>
|
|
<blockquote><a href="htmldocumenthtmlexmpl.htm">Example: Using HTMLDocument to generate both HTML source and XSL FO source</a></blockquote>
|
|
</div>
|
|
<div class="section"><h4 class="sectiontitle">Javadoc reference documentation</h4><p>For more information
|
|
about the HTMLDocument class, see the following Javadoc reference documentation:</p>
|
|
<blockquote><a href="javadoc/com/ibm/as400/util/html/HTMLDocument.html">HTMLDocument</a></blockquote>
|
|
</div>
|
|
<div class="section"><p>The following disclaimer applies to all of the IBM<sup>®</sup> Toolbox for Java examples:</p>
|
|
<blockquote><strong>Code
|
|
example disclaimer</strong> <p>IBM grants you a nonexclusive copyright license to use
|
|
all programming code examples from which you can generate similar function
|
|
tailored to your own specific needs.</p>
|
|
<p>All sample code is provided by IBM for
|
|
illustrative purposes only. These examples have not been thoroughly tested
|
|
under all conditions. IBM, therefore, cannot guarantee or imply reliability,
|
|
serviceability, or function of these programs.</p>
|
|
<p>All programs contained
|
|
herein are provided to you "AS IS" without any warranties of any kind. The
|
|
implied warranties of non-infringement, merchantability and fitness for a
|
|
particular purpose are expressly disclaimed.</p>
|
|
</blockquote>
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html> |