|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.topologi.diffx.format.BasicXMLFormatter
public final class BasicXMLFormatter
A XML formatter that simply uses a different namespace for any inserted or modified node.
Nodes that have not changed are kept the way they are.
Nodes that have been modified will always be in a different namespace and will be reported as follows:
Elements:
<mod:element name="elt.getName()" uri="elt.getURI()">
...
</mod:element>
Attributes:
<mod:attribute name="att.getName()" uri="att.getURI()" value="att.getValue()"/>
Texts:
<mod:text>text.getCharacters()</mod:text>
| Constructor Summary | |
|---|---|
BasicXMLFormatter(Writer w)
Creates a new formatter using the specified writer. |
|
| Method Summary | |
|---|---|
void |
declarePrefixMapping(PrefixMapping mapping)
Adds the prefix mapping to this class. |
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 |
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 BasicXMLFormatter(Writer w)
throws NullPointerException
w - The writer to use.
NullPointerException - If the specified writer is null.| Method Detail |
|---|
public void format(DiffXEvent e)
throws IOException
format in interface DiffXFormattere - The event to format
IOException - Should an I/O exception occurs while formatting.
public void insert(DiffXEvent e)
throws IOException
insert in interface DiffXFormattere - The event to format
IOException - Should an I/O exception occurs while formatting.
public void delete(DiffXEvent e)
throws IOException
delete in interface DiffXFormattere - The event to format
IOException - Should an I/O exception occurs while formatting.public void setConfig(DiffXConfig config)
DiffXFormatter
setConfig in interface DiffXFormatterconfig - The configuration to use.public void setWriteXMLDeclaration(boolean show)
XMLDiffXFormatter
setWriteXMLDeclaration in interface XMLDiffXFormattershow - true to get the formatter to write the XML declaration;
false otherwise.public void declarePrefixMapping(PrefixMapping mapping)
declarePrefixMapping in interface XMLDiffXFormattermapping - The prefix mapping to add.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||