|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectcom.jme3.export.xml.DOMSerializer
public class DOMSerializer
The DOMSerializer was based primarily off the DOMSerializer.java class from the "Java and XML" 3rd Edition book by Brett McLaughlin, and Justin Edelson. Some modifications were made to support formatting of elements and attributes.
コンストラクタの概要 | |
---|---|
DOMSerializer()
|
メソッドの概要 | |
---|---|
void |
serialize(org.w3c.dom.Document doc,
java.io.File file)
Serialize doc to out |
void |
serialize(org.w3c.dom.Document doc,
java.io.OutputStream out)
Serialize doc to out |
void |
setEncoding(java.lang.String encoding)
Set the encoding used by this serializer. |
void |
setIndent(int indent)
Set the number of spaces to use for indentation. |
void |
setLineSeparator(java.lang.String lineSeparator)
Set the line separator that will be used when serializing documents. |
クラス java.lang.Object から継承されたメソッド |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
コンストラクタの詳細 |
---|
public DOMSerializer()
メソッドの詳細 |
---|
public void serialize(org.w3c.dom.Document doc, java.io.File file) throws java.io.IOException
doc
to out
doc
- the document to serialize.file
- the file to serialize to.
java.io.IOException
public void serialize(org.w3c.dom.Document doc, java.io.OutputStream out) throws java.io.IOException
doc
to out
doc
- the document to serialize.out
- the stream to serialize to.
java.io.IOException
public void setEncoding(java.lang.String encoding)
encoding
- the encoding to use, passing in null
results in the
default encoding (UTF-8) being set.
IllegalCharsetNameException
- if the given charset name is illegal.
UnsupportedCharsetException
- if the given charset is not supported by the
current JVM.public void setIndent(int indent)
The default is to use 4 spaces.
indent
- the number of spaces to use for indentation, values less than or
equal to zero result in no indentation being used.public void setLineSeparator(java.lang.String lineSeparator)
If this is not called then the serializer uses a default based on the
line.separator
system property.
lineSeparator
- the line separator to set.
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |