gnu.xml
public class XMLPrinter extends OutPort implements PositionConsumer, XConsumer
| Field Summary | |
|---|---|
| boolean | canonicalizeCDATA |
| static ThreadLocation | doctypePublic The system identifier emitted in a DOCTYPE declaration.
|
| static ThreadLocation | doctypeSystem Fluid parameter to control whether a DOCTYPE declaration is emitted.
|
| boolean | escapeNonAscii |
| boolean | escapeText |
| boolean | indentAttributes When indentating, should attributes be lined up? |
| static ThreadLocation | indentLoc |
| int | printIndent Controls whether to add extra indentation.
|
| boolean | strict |
| int | useEmptyElementTag Handling of empty elements.
|
| Constructor Summary | |
|---|---|
| XMLPrinter(OutPort out, boolean autoFlush) | |
| XMLPrinter(Writer out, boolean autoFlush) | |
| XMLPrinter(OutputStream out, boolean autoFlush) | |
| XMLPrinter(Writer out) | |
| XMLPrinter(OutputStream out) | |
| XMLPrinter(OutputStream out, Path path) | |
| Method Summary | |
|---|---|
| void | beginComment() |
| void | beginEntity(Object base) |
| void | closeTag() |
| void | consume(SeqPosition position) |
| void | endAttribute() |
| void | endComment() |
| void | endDocument() |
| void | endElement() |
| void | endEntity() |
| protected void | endNumber() |
| void | error(String msg, String code) |
| static String | formatDecimal(BigDecimal dec) Format java.math.BigDecimal as needed for XPath/XQuery's xs:decimal.
|
| static String | formatDouble(double d) Helper to format xs:double according to XPath/XQuery specification. |
| static String | formatFloat(float f) Helper to format xs:float according to XPath/XQuery specification. |
| boolean | ignoring() True if consumer is ignoring rest of element.
|
| static boolean | isHtmlEmptyElementTag(String name) |
| static XMLPrinter | make(OutPort out, Object style) |
| void | print(Object v) |
| void | setPrintXMLdecl(boolean value) |
| void | setStyle(Object style) |
| void | startAttribute(Object attrType) Write a attribute for the current element.
|
| void | startDocument() |
| void | startElement(Object type) |
| protected void | startNumber() |
| static String | toString(Object value) Convert argument to string in XML syntax. |
| void | write(int v) |
| void | write(String str, int start, int length) |
| void | write(char[] buf, int off, int len) |
| void | writeBaseUri(Object uri) |
| void | writeBoolean(boolean v) |
| void | writeCDATA(char[] chars, int offset, int length) |
| void | writeComment(String chars) |
| void | writeComment(char[] chars, int offset, int length) |
| void | writeDouble(double d) |
| void | writeFloat(float f) |
| void | writeObject(Object v) |
| void | writePosition(AbstractSequence seq, int ipos) |
| void | writeProcessingInstruction(String target, char[] content, int offset, int length) |
| protected void | writeQName(Object name) |