|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsimple.xml.stream.Format
public class Format
The Format
object is used to provide information on
how a generated XML document should be structured. The information
provided tells the formatter whether an XML prolog is required and
the number of spaces that should be used for indenting. The prolog
specified will be written directly before the XML document.
Should a Format
be created with an indent of zero or
less then no indentation is done, and the generated XML will be on
the same line. The prolog can contain any legal XML heading, which
can domain a DTD declaration and XML comments if required.
Constructor Summary | |
---|---|
Format()
Constructor for the Format object. |
|
Format(int indent)
Constructor for the Format object. |
|
Format(int indent,
java.lang.String prolog)
Constructor for the Format object. |
|
Format(java.lang.String prolog)
Constructor for the Format object. |
Method Summary | |
---|---|
int |
getIndent()
This method returns the size of the indent to use for the XML generated. |
java.lang.String |
getProlog()
This method returns the prolog that is to be used at the start of the generated XML document. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Format()
Format
object. This creates an
object that is used to describe how the formatter should create
the XML document. This constructor uses an indent size of three.
public Format(int indent)
Format
object. This creates an
object that is used to describe how the formatter should create
the XML document. This constructor uses the specified indent
size and a null prolog, which means no prolog is generated.
indent
- this is the number of spaces used in the indentpublic Format(java.lang.String prolog)
Format
object. This creates an
object that is used to describe how the formatter should create
the XML document. This constructor uses the specified prolog
that is to be inserted at the start of the XML document.
prolog
- this is the prolog for the generated XML documentpublic Format(int indent, java.lang.String prolog)
Format
object. This creates an
object that is used to describe how the formatter should create
the XML document. This constructor uses the specified indent
size and the text to use in the generated prolog.
indent
- this is the number of spaces used in the indentprolog
- this is the prolog for the generated XML documentMethod Detail |
---|
public int getIndent()
public java.lang.String getProlog()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |