|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jsoup.nodes.Document.OutputSettings
public static class Document.OutputSettings
A Document's output settings control the form of the text() and html() methods.
Constructor Summary | |
---|---|
Document.OutputSettings()
|
Method Summary | |
---|---|
Charset |
charset()
Get the document's current output charset, which is used to control which characters are escaped when generating HTML (via the html() methods), and which are kept intact. |
Document.OutputSettings |
charset(Charset charset)
Update the document's output charset. |
Document.OutputSettings |
charset(String charset)
Update the document's output charset. |
Document.OutputSettings |
clone()
|
Entities.EscapeMode |
escapeMode()
Get the document's current HTML escape mode: base , which provides a limited set of named HTML
entities and escapes other characters as numbered entities for maximum compatibility; or extended ,
which uses the complete set of HTML named entities. |
Document.OutputSettings |
escapeMode(Entities.EscapeMode escapeMode)
Set the document's escape mode |
int |
indentAmount()
Get the current tag indent amount, used when pretty printing. |
Document.OutputSettings |
indentAmount(int indentAmount)
Set the indent amount for pretty printing |
boolean |
prettyPrint()
Get if pretty printing is enabled. |
Document.OutputSettings |
prettyPrint(boolean pretty)
Enable or disable pretty printing. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Document.OutputSettings()
Method Detail |
---|
public Entities.EscapeMode escapeMode()
base
, which provides a limited set of named HTML
entities and escapes other characters as numbered entities for maximum compatibility; or extended
,
which uses the complete set of HTML named entities.
The default escape mode is base
.
public Document.OutputSettings escapeMode(Entities.EscapeMode escapeMode)
escapeMode
- the new escape mode to use
public Charset charset()
html()
methods), and which are kept intact.
Where possible (when parsing from a URL or File), the document's output charset is automatically set to the input charset. Otherwise, it defaults to UTF-8.
public Document.OutputSettings charset(Charset charset)
charset
- the new charset to use.
public Document.OutputSettings charset(String charset)
charset
- the new charset (by name) to use.
public boolean prettyPrint()
public Document.OutputSettings prettyPrint(boolean pretty)
pretty
- new pretty print setting
public int indentAmount()
public Document.OutputSettings indentAmount(int indentAmount)
indentAmount
- number of spaces to use for indenting each level. Must be >= 0.
public Document.OutputSettings clone()
clone
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |