org.basex.io.serial
Class HTMLSerializer

java.lang.Object
  extended by org.basex.io.serial.Serializer
      extended by org.basex.io.serial.OutputSerializer
          extended by org.basex.io.serial.HTMLSerializer

public class HTMLSerializer
extends OutputSerializer

This class serializes data as HTML.

Author:
BaseX Team 2005-12, BSD License, Christian Gruen

Field Summary
 
Fields inherited from class org.basex.io.serial.OutputSerializer
content, ct, docsys, escape, html5, indents, isep, nl, out, saomit, script, sep, tab
 
Fields inherited from class org.basex.io.serial.Serializer
elem, indent, level, PROPS, tags, undecl
 
Method Summary
protected  void attribute(byte[] n, byte[] v)
          Serializes an attribute.
protected  void code(int ch)
          Encodes the specified character before printing it.
protected  boolean doctype(byte[] dt)
          Prints the document type declaration.
protected  void finishClose()
          Closes an element.
protected  void finishComment(byte[] n)
          Serializes a comment.
protected  void finishEmpty()
          Closes an empty element.
protected  void finishOpen()
          Finishes an opening element node.
protected  void finishPi(byte[] n, byte[] v)
          Serializes a processing instruction.
protected  void startOpen(byte[] t)
          Starts an element.
 
Methods inherited from class org.basex.io.serial.OutputSerializer
atomic, close, closeResult, ct, finished, finishText, finishText, hex, indent, openDoc, openResult, print, print, print, printChar, reset
 
Methods inherited from class org.basex.io.serial.Serializer
closeDoc, closeElement, get, get, namespace, nsUri, serialize, startElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

attribute

protected void attribute(byte[] n,
                         byte[] v)
                  throws java.io.IOException
Description copied from class: Serializer
Serializes an attribute.

Overrides:
attribute in class OutputSerializer
Parameters:
n - name
v - value
Throws:
java.io.IOException - I/O exception

finishComment

protected void finishComment(byte[] n)
                      throws java.io.IOException
Description copied from class: Serializer
Serializes a comment.

Overrides:
finishComment in class OutputSerializer
Parameters:
n - value
Throws:
java.io.IOException - I/O exception

finishPi

protected void finishPi(byte[] n,
                        byte[] v)
                 throws java.io.IOException
Description copied from class: Serializer
Serializes a processing instruction.

Overrides:
finishPi in class OutputSerializer
Parameters:
n - name
v - value
Throws:
java.io.IOException - I/O exception

code

protected void code(int ch)
             throws java.io.IOException
Description copied from class: OutputSerializer
Encodes the specified character before printing it.

Overrides:
code in class OutputSerializer
Parameters:
ch - character to be encoded and printed
Throws:
java.io.IOException - I/O exception

startOpen

protected void startOpen(byte[] t)
                  throws java.io.IOException
Description copied from class: Serializer
Starts an element.

Overrides:
startOpen in class OutputSerializer
Parameters:
t - tag name
Throws:
java.io.IOException - I/O exception

finishOpen

protected void finishOpen()
                   throws java.io.IOException
Description copied from class: Serializer
Finishes an opening element node.

Overrides:
finishOpen in class OutputSerializer
Throws:
java.io.IOException - I/O exception

finishEmpty

protected void finishEmpty()
                    throws java.io.IOException
Description copied from class: Serializer
Closes an empty element.

Overrides:
finishEmpty in class OutputSerializer
Throws:
java.io.IOException - I/O exception

finishClose

protected void finishClose()
                    throws java.io.IOException
Description copied from class: Serializer
Closes an element.

Overrides:
finishClose in class OutputSerializer
Throws:
java.io.IOException - I/O exception

doctype

protected boolean doctype(byte[] dt)
                   throws java.io.IOException
Description copied from class: OutputSerializer
Prints the document type declaration.

Overrides:
doctype in class OutputSerializer
Parameters:
dt - document type, or null for html type
Returns:
true if doctype was added
Throws:
java.io.IOException - I/O exception