}
record.setSession(session);
if (isFragment()) {
record.node(xmlDocument, xmlDescriptor.getNamespaceResolver());
} else {
record.startDocument(encoding, version);
record.node(xmlDocument, record.getNamespaceResolver());
record.endDocument();
}
} catch (XMLPlatformException e) {
throw XMLMarshalException.marshalException(e);