org.jacoco.report.internal.html

## Class HTMLDocument

- java.lang.Object
- - org.jacoco.report.internal.xml.XMLElement
  - - org.jacoco.report.internal.xml.XMLDocument
    - - org.jacoco.report.internal.html.HTMLDocument

    public class HTMLDocument
    extends XMLDocument

`XMLDocument` that declares its content type to be XHTML 1.0 Strict and produces `HTMLElement`s as children.

### Field Summary

### Fields inherited from class org.jacoco.report.internal.xml.XMLElement

`writer`

### Constructor Summary

Constructors
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.

### Method Summary

All Methods Instance Methods Concrete Methods
`HTMLElement` `body()` Creates a 'body' element.
`HTMLElement` `element(String name)` Creates a new child element for this element,
`HTMLElement` `head()` Creates a 'head' element.

### Methods inherited from class org.jacoco.report.internal.xml.XMLDocument

`close`

### Methods inherited from class org.jacoco.report.internal.xml.XMLElement

`addChildElement, attr, attr, attr, beginOpenTag, text`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### HTMLDocument

    public HTMLDocument(Writer writer,
                        String encoding)
                 throws IOException

Creates a new HTML document based on the given writer.

Parameters:
  `writer` - writer for content output
  `encoding` - document encoding
Throws:
  `IOException` - in case of problems with the writer

#### HTMLDocument

    public HTMLDocument(OutputStream output,
                        String encoding)
                 throws IOException

Creates a new HTML document based on the given stream.

Parameters:
  `output` - stream for content output
  `encoding` - document encoding
Throws:
  `IOException` - in case of problems with the stream

### Method Detail

#### element

    public HTMLElement element(String name)
                        throws IOException

Description copied from class: `XMLElement`
Creates a new child element for this element,

Overrides:
  `element` in class `XMLElement`
Parameters:
  `name` - name of the child element
Returns:
  child element instance
Throws:
  `IOException` - in case of problems with the writer

#### head

    public HTMLElement head()
                     throws IOException

Creates a 'head' element.

Returns:
  'head' element
Throws:
  `IOException` - in case of problems with the writer

#### body

    public HTMLElement body()
                     throws IOException

Creates a 'body' element.

Returns:
  'body' element
Throws:
  `IOException` - in case of problems with the writer