protected Node objectToXMLNode(Object object, XMLDescriptor descriptor, boolean isXMLRoot) throws XMLMarshalException {
return objectToXMLNode(object, null, descriptor, isXMLRoot);
}
protected Node objectToXMLNode(Object object, Node rootNode, XMLDescriptor descriptor, boolean isXMLRoot) throws XMLMarshalException {
AbstractSession session = xmlContext.getSession(descriptor);
if ((session != null) && xmlContext.getDocumentPreservationPolicy(session).shouldPreserveDocument()) {
XMLRecord xmlRow = null;
if (!isXMLRoot) {
xmlRow = (XMLRecord) ((XMLObjectBuilder) descriptor.getObjectBuilder()).createRecordFor(object, xmlContext.getDocumentPreservationPolicy(session));
xmlRow.setMarshaller(this);