Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * This file is part of the DiffX library.
  *
  * For licensing information please see the file license.txt included in the release.
  * A copy of this licence can also be found at
  *   http://www.opensource.org/licenses/artistic-license-2.0.php
  */
 package com.topologi.diffx.xml;

An Object which implements this interface can be formatted as XML using a toXML method as a string.

This method is provided for convenience for small object to avoid the overhead in using writers.

Author(s):
Christophe Lauret (Allette Systems)
Version:
10 December 2004
public interface XMLFormattable {

  
Appends the XML representation of the object of the implementing class.

Implementations must ensure that the returned string buffer is the same object as the specified string buffer.

Parameters:
xml The string buffer to which the XML representation is appended to.
Returns:
The modified string buffer.
Throws:
java.lang.NullPointerException if the specified character sequence is null.

Returns a xml representation of the object of the implementing class.

Most implementation should use the following code to ensure consistent data with the other toXML method:

return this.toXML(new StringBuffer()).toString();

Returns:
a XML representation of the object of the implementing class.
  String toXML();
New to GrepCode? Check out our FAQ X