Method Summary |
|
static void | add(IntMap map, String name, int value) |
static void | add(HashMap<String, String> map, String name) |
public void | addCdataElement(String elt) |
public void | attribute(String uri, String localName, String qName, String value) |
public void | cdata(String text) |
public void | cdata(char[] buffer, int offset, int length) |
public void | comment(String data) |
public void | endDocument() |
public void | endElement(String uri, String localName, String qName) |
public void | endPrefixMapping(String prefix) |
public boolean | finishAttributes() Complete printing of the attributes when the open tag completes. |
public boolean | getEscapeText() |
public boolean | getEscaping() Returns the current XML escaping. |
public boolean | getIncludeContentType() Return true if the printer should automatically add the
<meta content-type> to HTML. |
public LineMap | getLineMap() |
public Path | getPath() |
boolean | getPrintDeclaration() |
String | getPublicId() |
String | getStandalone() |
WriteStream | getStream() |
String | getSystemId() |
public void | init(WriteStream os) Initialize the XmlPrinter with the write stream. |
void | init() Initialize the XmlWriter in preparation for serializing a new XML. |
boolean | isHtml() Returns true if the printer is printing HTML. |
public boolean | isJSP() True if this is JSP special cased. |
public boolean | isPretty() Returns true if the printer is currently pretty-printing the output. |
public static void | print(Path path, Node node) Prints the node as XML. |
public void | print(Node node) |
void | print(char[] buf) Prints a char buffer. |
void | print(char[] buf, int off, int len) Prints a char buffer. |
void | print(String text) Prints a chunk of text. |
void | print(char ch) Prints a character. |
void | print(int i) Prints an integer to the output stream. |
void | printDecl(String text) |
public void | printHeader(String top) Prints the header, if necessary. |
public void | printHtml(Node node) |
public void | printNode(Node node) |
public void | printPrettyXml(Node node) |
public String | printString(Node node) Prints the node as XML to a string. |
public void | printXml(Node node) Prints the node as XML. |
void | println() Prints a newline to the output stream. |
void | println(String text) |
public void | processingInstruction(String name, String data) |
public void | setDocumentLocator(Locator locator) Sets the locator. |
public void | setEncoding(String encoding) Sets the character set encoding for the output file. |
public void | setEscapeText(boolean isEscaped) Sets true if the text should be escaped, else it will be printed
verbatim. |
public void | setEscaping(boolean escapeText) Sets to true if XML entities like < should be escaped as <. |
public void | setIncludeContentType(boolean include) Set true if the printer should automatically add the
<meta content-type> to HTML. |
public void | setJSP(boolean isJsp) Set true if this is JSP special cased. |
public void | setLineMap(String filename) Creates a new line map. |
public void | setLocation(String filename, int line, int column) Sets the current location. |
public void | setMethod(String method) Sets the output methods, like the XSL <xsl:output method='method'/>. |
public void | setMimeType(String mimeType) |
public void | setPretty(boolean isPretty) Set to true if the printer should add whitespace to 'pretty-print'
the output. |
public void | setPrintDeclaration(boolean printDeclaration) |
public void | setPublicId(String id) |
public void | setStandalone(String standalone) |
public void | setSystemId(String id) |
public void | setVersion(String version) Sets the XML/HTML version of the output file. |
public void | startDocument(Document document) |
public void | startDocument() Callback when the document starts printing. |
public void | startElement(String url, String localName, String qName) Called at the start of a new element. |
public void | startPrefixMapping(String prefix, String uri) |
public void | text(String text) Prints text. |
public void | text(char[] buffer, int offset, int length) Prints text. |
boolean | trimPrettyWhitespace(char[] buffer, int offset, int length) If the text is completely whitespace, skip it. |