public class HTMLDocument extends XMLDocument
XMLDocument that declares its content type to be XHTML 1.0 Strict and
produces HTMLElements 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.
|
closeaddChildElement, attr, attr, attr, beginOpenTag, textpublic 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
XMLElementelement in class XMLElementname - 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 © 2024. All rights reserved.