} catch (IOException ioe) { throw new XMLDBException(ErrorCodes.VENDOR_ERROR, ioe.getMessage(), ioe);
} catch (TransformerException e) { throw new XMLDBException(ErrorCodes.VENDOR_ERROR, e.getMessage(), e); } finally { DOMSerializerPool.getInstance().returnDOMSerializer(xmlout);
	public void setContentAsDOM(Node root) throws XMLDBException {		StringWriter sout = new StringWriter();		OutputFormat format = new OutputFormat("xml", "UTF-8", false);		XMLSerializer xmlout = new XMLSerializer(sout, format);		try {			switch (root.getNodeType()) {				case Node.ELEMENT_NODE :					xmlout.serialize((Element) root);					break;				case Node.DOCUMENT_FRAGMENT_NODE :					xmlout.serialize((DocumentFragment) root);					break;				case Node.DOCUMENT_NODE :					xmlout.serialize((Document) root);					break;				default :					throw new XMLDBException(ErrorCodes.VENDOR_ERROR, "invalid node type");			}			content = sout.toString();		} catch (IOException ioe) {			throw new XMLDBException(ErrorCodes.VENDOR_ERROR, ioe.getMessage(), ioe);		}	}