|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.topologi.diffx.format.StrictXMLFormatter
A simple XML formatter that writes strictly what it is given.
This formatter will write the events exactly in the order in which they are given,
in other words, there is no way to prevent this class from writing malformed XML.
On other hand, the SmartXMLFormatter will close
XML elements automatically, therefore rectifying a lot of the errors that lead to
malformed XML.
| Constructor Summary | |
StrictXMLFormatter()
Creates a new formatter on the standard output. |
|
StrictXMLFormatter(Writer w)
Creates a new formatter using the specified writer. |
|
| Method Summary | |
void |
delete(DiffXEvent e)
Formats the specified deleted event. |
void |
format(DiffXEvent e)
Formats the specified event. |
void |
insert(DiffXEvent e)
Formats the specified inserted event. |
void |
setConfig(DiffXConfig config)
Sets the configuration to use with this formatter. |
void |
setDeleteTags(String start,
String end)
Sets the open and end tags for deleted text. |
void |
setInsertTags(String start,
String end)
Sets the open and end tags for inserted text. |
void |
setWriteXMLDeclaration(boolean show)
Set whether the formatter should include the XML declaration or not. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public StrictXMLFormatter()
public StrictXMLFormatter(Writer w)
w - The writer to use.| Method Detail |
public void format(DiffXEvent e)
throws IOException
DiffXFormatter
format in interface DiffXFormattere - The event to format
IOException - Should an I/O exception occurs whilst formatting.DiffXFormatter.format(DiffXEvent)
public void insert(DiffXEvent e)
throws IOException
DiffXFormatter
insert in interface DiffXFormattere - The event to format
IOException - Should an I/O exception occurs whilst formatting.DiffXFormatter.insert(DiffXEvent)
public void delete(DiffXEvent e)
throws IOException,
IllegalStateException
DiffXFormatter
delete in interface DiffXFormattere - The event to format
IOException - Should an I/O exception occurs whilst formatting.
IllegalStateException - If the formatter is not in a state to run this method.DiffXFormatter.delete(DiffXEvent)
public void setInsertTags(String start,
String end)
throws NullPointerException
The default values are "<ins:>" and "</ins:>" respectively.
start - The open tag for inserts.end - The close tag for inserts.
NullPointerException - If any of the tags is null.
public void setDeleteTags(String start,
String end)
throws NullPointerException
The default values are "<del:>" and "</del:>" respectively.
start - The open tag for deletions.end - The close tag for deletions.
NullPointerException - If any of the tags is null.public void setConfig(DiffXConfig config)
DiffXFormatter
setConfig in interface DiffXFormatterconfig - The configuration to use.com.topologi.diffx.format.DiffXFormatter#setConfig(com.topologi.diffx.DiffXConfig)public void setWriteXMLDeclaration(boolean show)
XMLDiffXFormatter
setWriteXMLDeclaration in interface XMLDiffXFormattershow - true to get the formatter to write the XML declaration;
false otherwise.XMLDiffXFormatter.setWriteXMLDeclaration(boolean)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||