|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.Writer java.io.PrintWriter gnu.lists.PrintConsumer gnu.xml.XMLPrinter
public class XMLPrinter
Print an event stream in XML format on a PrintWriter.
Field Summary | |
---|---|
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 |
escapeText
|
static ThreadLocation |
indentLoc
|
Fields inherited from class java.io.PrintWriter |
---|
out |
Fields inherited from class java.io.Writer |
---|
lock |
Constructor Summary | |
---|---|
XMLPrinter(Consumer out)
|
|
XMLPrinter(Consumer out,
boolean autoFlush)
|
|
XMLPrinter(java.io.OutputStream out)
|
|
XMLPrinter(java.io.OutputStream out,
boolean autoFlush)
|
|
XMLPrinter(PrintConsumer out)
|
|
XMLPrinter(PrintConsumer out,
boolean autoFlush)
To disambiguate between Writer and Consumer versions. |
|
XMLPrinter(java.io.Writer out)
|
|
XMLPrinter(java.io.Writer out,
boolean autoFlush)
|
Method Summary | |
---|---|
void |
beginAttribute(java.lang.String attrName,
java.lang.Object attrType)
Write a attribute for the current group. |
void |
beginDocument()
|
void |
beginGroup(java.lang.String typeName,
java.lang.Object type)
|
void |
consume(SeqPosition position)
Consume node at current position. |
void |
endAttribute()
|
void |
endDocument()
|
void |
endGroup(java.lang.String typeName)
|
boolean |
ignoring()
True if consumer is ignoring rest of group. |
static boolean |
isHtmlEmptyElementTag(java.lang.String name)
|
protected static boolean |
isWordChar(char ch)
|
static XMLPrinter |
make(Consumer out,
java.lang.Object style)
|
void |
setStyle(java.lang.Object style)
|
protected void |
startNumber()
|
static java.lang.String |
toString(java.lang.Object value)
Convert argument to string in XML syntax. |
void |
write(char[] buf,
int off,
int len)
|
void |
writeBaseUri(java.lang.Object uri)
Write/set the base-uri property of the current element or document. |
void |
writeBoolean(boolean v)
|
void |
writeCDATA(char[] chars,
int offset,
int length)
|
void |
writeChar(int v)
|
void |
writeChars(java.lang.String str)
|
void |
writeComment(char[] chars,
int offset,
int length)
|
void |
writeObject(java.lang.Object v)
|
void |
writePosition(AbstractSequence seq,
int ipos)
Consume a single position pair. |
void |
writeProcessingInstruction(java.lang.String target,
char[] content,
int offset,
int length)
|
Methods inherited from class gnu.lists.PrintConsumer |
---|
append, append, append, writeDouble, writeFloat, writeInt, writeLong |
Methods inherited from class java.io.PrintWriter |
---|
checkError, close, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, println, setError, write, write, write, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface gnu.lists.Consumer |
---|
append, append, append, writeDouble, writeFloat, writeInt, writeLong |
Field Detail |
---|
public boolean escapeText
public static final ThreadLocation doctypeSystem
public static final ThreadLocation doctypePublic
public static final ThreadLocation indentLoc
Constructor Detail |
---|
public XMLPrinter(java.io.Writer out, boolean autoFlush)
public XMLPrinter(Consumer out, boolean autoFlush)
public XMLPrinter(PrintConsumer out, boolean autoFlush)
public XMLPrinter(java.io.OutputStream out, boolean autoFlush)
public XMLPrinter(Consumer out)
public XMLPrinter(java.io.Writer out)
public XMLPrinter(PrintConsumer out)
public XMLPrinter(java.io.OutputStream out)
Method Detail |
---|
public static XMLPrinter make(Consumer out, java.lang.Object style)
public static java.lang.String toString(java.lang.Object value)
public void setStyle(java.lang.Object style)
protected static final boolean isWordChar(char ch)
public void writeChar(int v)
writeChar
in interface Consumer
writeChar
in class PrintConsumer
public void writeBoolean(boolean v)
writeBoolean
in interface Consumer
writeBoolean
in class PrintConsumer
protected void startNumber()
startNumber
in class PrintConsumer
public void beginDocument()
beginDocument
in interface Consumer
beginDocument
in class PrintConsumer
public void endDocument()
endDocument
in interface Consumer
endDocument
in class PrintConsumer
public void beginGroup(java.lang.String typeName, java.lang.Object type)
beginGroup
in interface Consumer
beginGroup
in class PrintConsumer
public static boolean isHtmlEmptyElementTag(java.lang.String name)
public void endGroup(java.lang.String typeName)
endGroup
in interface Consumer
endGroup
in class PrintConsumer
public void beginAttribute(java.lang.String attrName, java.lang.Object attrType)
beginAttribute
in interface Consumer
beginAttribute
in class PrintConsumer
public void endAttribute()
endAttribute
in interface Consumer
endAttribute
in class PrintConsumer
public void writeObject(java.lang.Object v)
writeObject
in interface Consumer
writeObject
in class PrintConsumer
public boolean ignoring()
ignoring
in interface Consumer
ignoring
in class PrintConsumer
public void writeChars(java.lang.String str)
writeChars
in interface Consumer
writeChars
in class PrintConsumer
public void write(char[] buf, int off, int len)
write
in interface Consumer
write
in class java.io.PrintWriter
public void writePosition(AbstractSequence seq, int ipos)
PositionConsumer
writePosition
in interface PositionConsumer
public void writeBaseUri(java.lang.Object uri)
XConsumer
writeBaseUri
in interface XConsumer
public void writeComment(char[] chars, int offset, int length)
writeComment
in interface XConsumer
public void writeCDATA(char[] chars, int offset, int length)
writeCDATA
in interface XConsumer
public void writeProcessingInstruction(java.lang.String target, char[] content, int offset, int length)
writeProcessingInstruction
in interface XConsumer
public void consume(SeqPosition position)
PositionConsumer
consume
in interface PositionConsumer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |