class BackendUtils {

    public static String getXMLAsString(Object obj) {
        if (obj instanceof Element) {
            // in case the object is a DOM element, we use the DOM functionality
            return Util.getXMLAsString((Element) obj);
        } else {
            return BackendUtils.getXMLAsString(obj, false);
        }
    }

}