doctype = slaveDoctype;
}
SAXReader reader = new SAXReader();
Document masterDoc = reader.read(new StringReader(masterXml));
Document slaveDoc = reader.read(new StringReader(slaveXml));
XMLDescriptor descriptor = null;
if (_descriptorClassName.equals(_AUTO_DESCRIPTOR)) {
descriptor = XMLTypeDetector.determineType(doctype, masterDoc);
}
else {
descriptor = (XMLDescriptor)Class.forName(
_descriptorClassName).newInstance();
}
XMLMerger merger = new XMLMerger(descriptor);
Document mergedDoc = merger.merge(masterDoc, slaveDoc);
return _documentToString(mergedDoc, doctype);
}