FileDocCategorySizeDatePackage
Document.javaAPI DocGlassfish v2 API3611Fri May 04 22:34:48 BST 2007com.sun.enterprise.diagnostics.report.html

Document

public interface Document implements HTMLComponent
Encapsulate a single HTML document. This holds a single HTML element with head and body elements, and allows specifying the document type.

Fields Summary
Constructors Summary
Methods Summary
public ElementgetBody()
Get the body element of this HTML document.

return
The body element.

public java.lang.StringgetDoctype()
Get the current doctype string.

return
The current doctype string.
see
#setDoctype(String)

public ElementgetHead()
Get the head element of this HTML document.

return
The head element.

public voidset(Element head, Element body)
Replace the content of this document with the specified head and body. If the head element does not have the name HEAD, or the body element does not have the name BODY, then an additional, new element is created with the appropriate name, and the input element is added to this element.

param
head A new head element.
param
body A new body element.
return
This document.

public voidsetDoctype(java.lang.String raw)
Explicitly set the doctype of this document. Right now the raw doctype string is given. It will be converted into a line of the form:
<!DOCTYPE html PUBLIC "raw">

This is not very flexible; perhaps this should be re-visited in the future.

param
raw The raw doctype string.
return
This document.