|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.basex.data.Serializer
org.basex.data.XMLSerializer
public final class XMLSerializer
This is an interface for serializing XML results.
| Field Summary | |
|---|---|
static java.lang.String |
INDENT
Indentation. |
PrintOutput |
out
Output stream. |
| Fields inherited from class org.basex.data.Serializer |
|---|
dn, ns |
| Constructor Summary | |
|---|---|
XMLSerializer(PrintOutput o)
Constructor. |
|
XMLSerializer(PrintOutput o,
boolean x,
boolean p)
Constructor. |
|
| Method Summary | |
|---|---|
void |
attribute(byte[] n,
byte[] v)
Serializes an attribute. |
void |
closeResult()
Closes a result. |
void |
cls()
Closes the serializer. |
void |
comment(byte[] n)
Serializes a comment. |
boolean |
finished()
Tests if the serialization was interrupted. |
void |
item(byte[] b)
Serializes an item. |
void |
openResult()
Starts a result. |
void |
pi(byte[] n,
byte[] v)
Serializes a processing instruction. |
void |
text(byte[] b)
Serializes a text. |
void |
text(byte[] b,
FTPos ftp)
Serializes a text. |
| Methods inherited from class org.basex.data.Serializer |
|---|
close, closeElement, emptyElement, emptyElement, level, namespace, node, node, openElement, openElement |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String INDENT
public final PrintOutput out
| Constructor Detail |
|---|
public XMLSerializer(PrintOutput o)
throws java.io.IOException
o - output stream reference
java.io.IOException - I/O exception
public XMLSerializer(PrintOutput o,
boolean x,
boolean p)
throws java.io.IOException
o - output stream referencex - serialize result as well-formed xmlp - pretty print the result
java.io.IOException - I/O exception| Method Detail |
|---|
public void cls()
throws java.io.IOException
Serializer
java.io.IOException - I/O exception
public void openResult()
throws java.io.IOException
Serializer
openResult in class Serializerjava.io.IOException - I/O exception
public void closeResult()
throws java.io.IOException
Serializer
closeResult in class Serializerjava.io.IOException - I/O exception
public void attribute(byte[] n,
byte[] v)
throws java.io.IOException
Serializer
attribute in class Serializern - namev - value
java.io.IOException - I/O exception
public void text(byte[] b)
throws java.io.IOException
Serializer
text in class Serializerb - text bytes
java.io.IOException - I/O exception
public void text(byte[] b,
FTPos ftp)
throws java.io.IOException
Serializer
text in class Serializerb - text bytesftp - full-text positions
java.io.IOException - I/O exception
public void comment(byte[] n)
throws java.io.IOException
Serializer
comment in class Serializern - comment
java.io.IOException - I/O exception
public void pi(byte[] n,
byte[] v)
throws java.io.IOException
Serializer
pi in class Serializern - namev - value
java.io.IOException - I/O exception
public void item(byte[] b)
throws java.io.IOException
Serializer
item in class Serializerb - text bytes
java.io.IOException - I/O exceptionpublic boolean finished()
Serializer
finished in class Serializer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||