Package com.jme3.export.xml
Class XMLExporter
java.lang.Object
com.jme3.export.xml.XMLExporter
- All Implemented Interfaces:
JmeExporter
Part of the jME XML IO system as introduced in the Google Code jmexml project.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetCapsule
(Savable object) Returns theOutputCapsule
for the given savable object.static XMLExporter
void
Export theSavable
to a file.void
save
(Savable object, OutputStream outputStream) Export theSavable
to an OutputStream.void
setIndentSpaces
(int indentSpaces) Sets the number of spaces used to indent nested tags.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.jme3.export.JmeExporter
save
-
Field Details
-
ELEMENT_MAPENTRY
- See Also:
-
ELEMENT_KEY
- See Also:
-
ELEMENT_VALUE
- See Also:
-
ATTRIBUTE_SIZE
- See Also:
-
ATTRIBUTE_DATA
- See Also:
-
ATTRIBUTE_CLASS
- See Also:
-
ATTRIBUTE_REFERENCE_ID
- See Also:
-
ATTRIBUTE_REFERENCE
- See Also:
-
ATTRIBUTE_SAVABLE_VERSIONS
- See Also:
-
-
Constructor Details
-
XMLExporter
public XMLExporter()
-
-
Method Details
-
save
Description copied from interface:JmeExporter
Export theSavable
to an OutputStream.- Specified by:
save
in interfaceJmeExporter
- Parameters:
object
- The savable to exportoutputStream
- The output stream- Throws:
IOException
- If an io exception occurs during export
-
save
Description copied from interface:JmeExporter
Export theSavable
to a file. If the path to the file doesn't exist, the parent directories can be created if thecreateDirectories
flag is true. If the path does not exist andcreateDirectories
is false, then an exception is thrown.- Specified by:
save
in interfaceJmeExporter
- Parameters:
object
- The savable to exportf
- The file to export tocreateDirectories
- flag to indicate if the directories should be created- Throws:
IOException
- If an io exception occurs during export
-
getCapsule
Description copied from interface:JmeExporter
Returns theOutputCapsule
for the given savable object.- Specified by:
getCapsule
in interfaceJmeExporter
- Parameters:
object
- The object to retrieve an output capsule for.- Returns:
- the
OutputCapsule
for the given savable object.
-
setIndentSpaces
public void setIndentSpaces(int indentSpaces) Sets the number of spaces used to indent nested tags.- Parameters:
indentSpaces
- The number of spaces to indent for each level of nesting. Default is 4. Pass 0 to disable pretty printing and write document without adding any whitespace.
-
getInstance
-