} else {
try {
String s = XMLHelper.getXML((DocumentFragment) obj);
log.debug("Object is DocumentFragment. Returning string.");
log_xml.debug("DocumentFragment -> String: " + s);
out.writeObject(s);
} catch (IOException e) {
log.error("Could not parse input DocumentFragment into string! Weird.", e);
if (err == null) {
throw new RuntimeException("Could not parse input DocumentFragment into string! Weird.", e);
} else {