echoxul.util.html
Class HtmlBuffer

java.lang.Object
  extended byechoxul.util.html.HtmlBuffer

public class HtmlBuffer
extends java.lang.Object

This class abstracts the creation of HTML text from XOM trees. Note that at this time, the algorithm is very naive and probably does not cover all parts of the spec which should be covered. When I get some more traction on the rest of the system, I should come back and spend some time making this one compliant. TODO: Investigate making this class fully spec compliant

Author:
Terry Laurenzo

Constructor Summary
HtmlBuffer()
           
 
Method Summary
 void appendTagClose(XULElement elt)
          Append a closing tag
 void appendTagOpen(XULElement elt)
          Appends a tag opening sequence.
 void appendText(java.lang.String text)
          Append text, correctly escaping the contents
 void clear()
          Clear all content from this buffer.
protected  java.lang.String entityConvert(java.lang.String in, java.lang.String chars)
           
 java.lang.String toString()
          Return the current HTML buffer contents
protected  java.lang.String unquoteString(java.lang.String in)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HtmlBuffer

public HtmlBuffer()
Method Detail

clear

public void clear()
Clear all content from this buffer. Same effect as creating a new one.


toString

public java.lang.String toString()
Return the current HTML buffer contents


appendTagOpen

public void appendTagOpen(XULElement elt)
Appends a tag opening sequence. Note that the element name is output regardless of the namespace. The caller should make sure that the element is actually an HTML element prior to the call.

Parameters:
elt -

appendTagClose

public void appendTagClose(XULElement elt)
Append a closing tag

Parameters:
elt -

appendText

public void appendText(java.lang.String text)
Append text, correctly escaping the contents

Parameters:
text -

unquoteString

protected java.lang.String unquoteString(java.lang.String in)

entityConvert

protected java.lang.String entityConvert(java.lang.String in,
                                         java.lang.String chars)


Copyright © 2004 Terry Laurenzo. All Rights Reserved.