|
||||||||||
| 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, tags |
| 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 |
close(int s)
Finishes the serializer. |
void |
closeResult()
Closes a result. |
void |
comment(byte[] n)
Serializes a comment. |
static byte[] |
content(Data data,
int p,
boolean s)
Returns the content of the current node. |
boolean |
finished()
Tests if the serialization was interrupted. |
void |
indent(boolean close)
Prints the text declaration to the output stream. |
void |
item(byte[] b)
Serializes an item. |
void |
open(int size)
Initializes the serializer. |
void |
openResult()
Starts a result. |
void |
pi(byte[] n,
byte[] v)
Serializes a processing instruction. |
void |
text(byte[] b)
Serializes a text. |
| Methods inherited from class org.basex.data.Serializer |
|---|
closeElement, emptyElement, emptyElement, emptyElement, finishElement, namespace, node, openElement, openElement, pi, startElement, startElement |
| 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)
o - output stream
public XMLSerializer(PrintOutput o,
boolean x,
boolean p)
o - output streamx - xml outputp - pretty printing| Method Detail |
|---|
public void open(int size)
throws java.io.IOException
Serializer
open in class Serializersize - number of results
java.io.IOException - exception
public void close(int s)
throws java.io.IOException
Serializer
close in class Serializers - number of results
java.io.IOException - exception
public void openResult()
throws java.io.IOException
Serializer
openResult in class Serializerjava.io.IOException - exception
public void closeResult()
throws java.io.IOException
Serializer
closeResult in class Serializerjava.io.IOException - exception
public void attribute(byte[] n,
byte[] v)
throws java.io.IOException
Serializer
attribute in class Serializern - namev - value
java.io.IOException - exception
public void text(byte[] b)
throws java.io.IOException
Serializer
text in class Serializerb - text bytes
java.io.IOException - exception
public void comment(byte[] n)
throws java.io.IOException
Serializer
comment in class Serializern - comment
java.io.IOException - exception
public void pi(byte[] n,
byte[] v)
throws java.io.IOException
Serializer
pi in class Serializern - namev - value
java.io.IOException - exception
public void item(byte[] b)
throws java.io.IOException
Serializer
item in class Serializerb - text bytes
java.io.IOException - exceptionpublic boolean finished()
Serializer
finished in class Serializer
public void indent(boolean close)
throws java.io.IOException
close - close flag
java.io.IOException - in case of problems with the PrintOutput
public static byte[] content(Data data,
int p,
boolean s)
data - data referencep - pre values - short representation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||