|
XFA4J | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.adobe.xfa.DOMSaveOptions
public final class DOMSaveOptions
A class to define DOM saving options. These include:
true, this suppresses output of the XML
<?xml version="1.0" ... ?>
preamble.
false.
true, this suppresses output of the XML DTD
declarations.
false which will cause the omission
of the DTD declarations.
true, a newline (U+0a) is rendered
before and after processing instructions and
comments which occur outside the document element.
false, but defaults to true if
PRETTY_OUTPUT is used.
true, empty elements are represented by an
opening tag and a closing tag.
false, the element is collapsed
when empty.
false.
true, attribute values are enclosed with
single quotes (name='myName').
false, attribute values are enclosed by
double quotes (name="myName").
false.
true, the output is UTF-8 encoded.
false, the output is encoded in some internal default.
false.
| Field Summary | |
|---|---|
static int |
PRETTY_OUTPUT
A display format with carriage returns, indented lines and white space added |
static int |
RAW_OUTPUT
A display format where the document is written without any formatting modifications |
static int |
SIMPLE_OUTPUT
A display format with carriage returns added, but no added white space |
| Constructor Summary | |
|---|---|
DOMSaveOptions()
Instantiates a object with default DOM save options. |
|
DOMSaveOptions(int ePrintFmt,
boolean bExcludePreamble,
boolean bIncludeDTD,
boolean bFormatOutside,
int nIndentLevel,
boolean bExpandElement,
boolean bUseSingleQuoteAttr,
java.lang.String sEntityChars,
char cRangeMin,
char cRangeMax,
java.lang.String sDisabledEntityChars,
boolean bIsUTF8,
boolean bSaveTransient,
boolean bSaveFragment)
Instantiates a object with the given DOM save options. |
|
| Method Summary | |
|---|---|
int |
getDisplayFormat()
Returns the display format. |
boolean |
getExcludePreamble()
Determines if the <?xml version="1.0" ?> preamble is excluded. |
boolean |
getExpandElement()
Determines if elements are output in their expanded form if empty. |
boolean |
getFormatOutside()
Determines if nodes outside the the document element are formatted. |
boolean |
getIncludeDTD()
Determines if DTD declarations are included. |
int |
getIndentLevel()
Gets the number of spaces used for each level of indentation. |
boolean |
getSaveFragment()
Determines if transient fragment nodes are written. |
boolean |
getSaveTransient()
Determines if transient/default nodes are written |
boolean |
getUseSingleQuoteAttr()
Determines whether attribute values are enclosed with single quotes. |
void |
setDisplayFormat(int ePrintFmt)
Sets the display format. |
void |
setExcludePreamble(boolean bExcludePreamble)
Determines whether the <?xml version="1.0" ?> preamble is excluded. |
void |
setExpandElement(boolean bExpandElement)
Determines whether elements are written in their expanded form if empty. |
void |
setFormatOutside(boolean bFormatOutside)
Determines whether nodes outside the the document element are formatted. |
void |
setIncludeDTD(boolean bIncludeDTD)
Sets if DTD declarations are included. |
void |
setIndentLevel(int nIndentLevel)
Sets the number of spaces used for each level of indentation. |
void |
setSaveFragment(boolean bSaveFragment)
Determines if transient fragment nodes are written. |
void |
setUseSingleQuoteAttr(boolean bUseSingleQuoteAttr)
Determines whether attribute values are enclosed with single quotes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int PRETTY_OUTPUT
public static final int RAW_OUTPUT
public static final int SIMPLE_OUTPUT
| Constructor Detail |
|---|
public DOMSaveOptions()
public DOMSaveOptions(int ePrintFmt,
boolean bExcludePreamble,
boolean bIncludeDTD,
boolean bFormatOutside,
int nIndentLevel,
boolean bExpandElement,
boolean bUseSingleQuoteAttr,
java.lang.String sEntityChars,
char cRangeMin,
char cRangeMax,
java.lang.String sDisabledEntityChars,
boolean bIsUTF8,
boolean bSaveTransient,
boolean bSaveFragment)
ePrintFmt - the serialization format.bExcludePreamble - exclude the preamble or not.bIncludeDTD - include the DTD or not.nIndentLevel - the indentation level.bFormatOutside - format nodes outside the document element or not.bExpandElement - expand elements or not.bUseSingleQuoteAttr - use single quotes or not.sEntityChars - characters to encode
using entity references [Not currently supported]cRangeMin - minimum range of characters
to encode using entity references [Not currently supported]cRangeMax - maximum range of characters
to encode using entity references [Not currently supported]sDisabledEntityChars - characters not to encode
using entity references [Not currently supported]bIsUTF8 - use UTF-8 encoding or not.| Method Detail |
|---|
public int getDisplayFormat()
DOMSaveOptions.PRETTY_OUTPUT, DOMSaveOptions.SIMPLE_OUTPUT or DOMSaveOptions.RAW_OUTPUTpublic boolean getExcludePreamble()
true if the XML declaration preamble is excluded, else false.public boolean getExpandElement()
true if empty elements are written with open and closing tagspublic boolean getFormatOutside()
true if nodes outside the document element are formatted,
else falsepublic boolean getIncludeDTD()
true if DTD declarations
are included, else falsepublic int getIndentLevel()
public boolean getSaveFragment()
AppModel.setExternalProtosAreTransient(boolean) has been used to
indicate that external protos are transient.
true if transient fragment nodes are written.DOMSaveOptions.setSaveFragment(boolean)public boolean getSaveTransient()
true if transient/default nodes are written.public boolean getUseSingleQuoteAttr()
true if attribute values are enclosed by "'",
false if attribute values are enclosed by """public void setDisplayFormat(int ePrintFmt)
ePrintFmt - one of: DOMSaveOptions.PRETTY_OUTPUT, DOMSaveOptions.SIMPLE_OUTPUT or DOMSaveOptions.RAW_OUTPUTpublic void setExcludePreamble(boolean bExcludePreamble)
bExcludePreamble - true if the preamble is excluded else falsepublic void setExpandElement(boolean bExpandElement)
bExpandElement - true if empty elements written with
open and closing tagspublic void setFormatOutside(boolean bFormatOutside)
bFormatOutside - true if nodes outside the document element
are formatted else false.public void setIncludeDTD(boolean bIncludeDTD)
bIncludeDTD - true if DTD
declarations are included else false.public void setIndentLevel(int nIndentLevel)
nIndentLevel - the number of spaces.public void setSaveFragment(boolean bSaveFragment)
AppModel.setExternalProtosAreTransient(boolean) has been used to
indicate that external protos are transient.
bSaveFragment - true if transient fragment nodes are written.- See Also:
DOMSaveOptions.getSaveFragment()public void setUseSingleQuoteAttr(boolean bUseSingleQuoteAttr)
bUseSingleQuoteAttr - true if attribute values are enclosed by "'",
false if by """
|
XFA4J | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||