}
public static Document tableToDocument(DocumentTable table) throws DTSMException {
if ( table != null ) {
try {
DOMProducer producer = new DOMProducer(table);
producer.process();
Node node = producer.getNode();
if ( node.getNodeType() == Node.DOCUMENT_NODE )
return (Document)node;
else
return node.getOwnerDocument();
}