|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.ejen.EjenChildNode | +--org.ejen.EjenSaveNode
Save node class.
A Save node saves the current in memory DOM tree to file.
Usage (ant build file) |
---|
|
Windows users: an understandable (but stupid) problem with Windows platforms comes
with carriage return conversion on saving. If the DOM tree to be saved contains a Node
with the "\r\n"
(0D0A
) String (alone or not), the saved file
will contain the "\r\r\n"
(0D0D0A
) String instead.
Parent nodes:
Field Summary | |
protected String |
_amount
|
protected String |
_encoding
|
protected String |
_file
|
protected String |
_indent
|
Fields inherited from class org.ejen.EjenChildNode |
_messageIndent |
Fields inherited from interface org.ejen.EjenConstants |
CTX_DOM_SOURCE, CTX_STYLESHEET_HANDLER, CTX_STYLESHEET_ROOT, CTX_TRANSFORMER_FACTORY_IMPL, CTX_TRANSFORMER_IMPL, DEFAULT_XML_DATA, DEFAULT_XML_DATA_ENCODING, DEFAULT_XSL_DATA, LOG_INDENT_STR1, LOG_INDENT_STR2, MSG_DEBUG, MSG_ERR, MSG_INFO, MSG_VERBOSE, MSG_WARN, STATE_AFTER_PROCESS, STATE_BEFORE_PROCESS, STATE_CHECK, STATE_IDLE, STATE_PROCESS, STATES |
Constructor Summary | |
EjenSaveNode()
|
Method Summary | |
void |
check()
Checks this EjenSaveNode for mandatory attributes. |
Properties |
getAttributes()
Returns all non null attributes of this EjenSaveNode. |
String |
nodeName()
Returns the name of this EjenSaveNode (always "save"). |
void |
process()
Executes this EjenSaveNode. |
void |
setAmount(String amount)
[optional/AVT] - sets the (indent) amount attribute. |
void |
setEncoding(String encoding)
[optional/AVT] - sets the encoding attribute. |
void |
setFile(String file)
[mandatory/AVT] - sets the file attribute. |
void |
setIndent(String indent)
[optional/AVT] - sets the indent attribute. |
Methods inherited from class org.ejen.EjenChildNode |
afterProcess, beforeProcess, cloneContext, evaluateAVT, evaluateAVT, getChildren, getFromContext, getFromContext, getFromGlobalContext, getListener, getState, idle, popContext, pushContext, putInContext, putInGlobalContext, sendMessageEvent, sendMessageEvent, sendStateEvent, sendXSLMessageEvent, sendXSLMessageEvent, setListener, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected String _file
protected String _encoding
protected String _indent
protected String _amount
Constructor Detail |
public EjenSaveNode()
Method Detail |
public String nodeName()
nodeName
in class EjenChildNode
public Properties getAttributes()
getAttributes
in class EjenChildNode
public void setFile(String file)
file
- name of the XML file to created.public void setEncoding(String encoding)
encoding
- encoding String (default is "iso-8859-1").public void setIndent(String indent)
indent
- "yes" or "no" (default is "yes").public void setAmount(String amount)
public void check()
check
in class EjenChildNode
EjenException
- if file attribute is not set.public void process()
process
in class EjenChildNode
EjenException
- if something goes wrong...
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |