public class HTMLDocument extends XMLDocument
XMLDocument
that declares its content type to be XHTML 1.0 Strict and
produces HTMLElement
s as children.writer
Constructor and Description |
---|
HTMLDocument(OutputStream output,
String encoding)
Creates a new HTML document based on the given stream.
|
HTMLDocument(Writer writer,
String encoding)
Creates a new HTML document based on the given writer.
|
Modifier and Type | Method and Description |
---|---|
HTMLElement |
body()
Creates a 'body' element.
|
HTMLElement |
element(String name)
Creates a new child element for this element,
|
HTMLElement |
head()
Creates a 'head' element.
|
close
addChildElement, attr, attr, attr, beginOpenTag, text
public HTMLDocument(Writer writer, String encoding) throws IOException
writer
- writer for content outputencoding
- document encodingIOException
- in case of problems with the writerpublic HTMLDocument(OutputStream output, String encoding) throws IOException
output
- stream for content outputencoding
- document encodingIOException
- in case of problems with the streampublic HTMLElement element(String name) throws IOException
XMLElement
element
in class XMLElement
name
- name of the child elementIOException
- in case of problems with the writerpublic HTMLElement head() throws IOException
IOException
- in case of problems with the writerpublic HTMLElement body() throws IOException
IOException
- in case of problems with the writerCopyright © 2013. All Rights Reserved.