) {
Node n = jaxbAssociation.getDomNode();
StringWriter out = new StringWriter();
SAXHandlerToCodeString saxHandlerToCodeString = new SAXHandlerToCodeString(out);
DOMSerializer domSerializer = new DOMSerializer();
try {
domSerializer.serialize(n, saxHandlerToCodeString);
} catch (SAXException e) {
return "Code generation not available for this object";
}
String result= out.toString();
result = result.substring(0, result.length()-1) +";";
// Now add the namespace declarations to the string
String nsStuff = saxHandlerToCodeString.getNamespaceDecs();
String completeXml = insertNamespaceDecs(result, nsStuff );
return completeXml;
}