org.apache.ws.commons.serialize
public interface XMLWriter extends ContentHandler
Method Summary | |
---|---|
boolean | canEncode(char pChar) Returns whether the XMLWriter can encode the character
|
String | getEncoding() Returns the writers encoding. |
String | getIndentString() Returns the string being used to indent an XML element
by one level. |
String | getLineFeed() Returns the line terminator. |
Writer | getWriter() Returns the target Writer. |
boolean | isDeclarating() Returns, whether an XML declaration is being generated. |
boolean | isFlushing() Returns, whether the method org.xml.sax.ContentHandler#endDocument
should do a flush on the target stream. |
boolean | isIndenting() Returns, whether the XMLWriter is indenting
(pretty printing). |
void | setDeclarating(boolean pDeclarating) Sets, whether an XML declaration is being generated. |
void | setEncoding(String pEncoding) Sets the writers encoding. |
void | setFlushing(boolean pFlushing) Sets, whether the method org.xml.sax.ContentHandler#endDocument
should do a flush on the target stream. |
void | setIndenting(boolean pIndenting) Returns, whether the XMLWriter is indenting
(pretty printing). |
void | setIndentString(String pIndentString) Sets the string being used to indent an XML element
by one level. |
void | setLineFeed(String pLineFeed) Sets the line terminator. |
void | setWriter(Writer pWriter) Sets the target Writer. |
Returns whether the XMLWriter can encode the character
c
without an escape sequence like &#ddd;.
Parameters: pChar The character being checked for escaping.
Returns: Whether to encode the character.
Returns: Writers encoding, by default null, in which case UTF-8 is being used.
Returns: The indentation string, by default " " (two blanks).
Returns: The line terminator, by default "\n" (Line Feed). You might prefer "\r\n" (Carriage Return, Line Feed), which is the default on Windows and related operating systems.
Returns: The target writer.
Returns: Whether an XML declaration is generated. Defaults to false.
Returns: True, if a flush should be done. Defaults to false.
XMLWriter
is indenting
(pretty printing). If you want indenting,
you should consider to invoke the methods
XMLWriter and
XMLWriter as well.Returns: Whether indentation is enabled. Defaults to false.
Parameters: pDeclarating Whether an XML declaration is generated. Defaults to false.
Parameters: pEncoding Writers encoding, by default null, in which case UTF-8 is being used.
Parameters: pFlushing True, if a flush should be done. Defaults to false.
XMLWriter
is indenting
(pretty printing). If you want indenting,
you should consider to invoke the methods
XMLWriter and
XMLWriter as well.Parameters: pIndenting Whether indentation is enabled. Defaults to false.
Parameters: pIndentString The indentation string, by default " " (two blanks).
Parameters: pLineFeed The line terminator, by default "\n" (Line Feed). You might prefer "\r\n" (Carriage Return, Line Feed), which is the default on Windows and related operating systems.
Parameters: pWriter The target writer.