xmlDocument = objectToXML(object, xmlDescriptor, isXMLRoot);
}
DOMReader reader = new DOMReader();
reader.setProperty("http://xml.org/sax/properties/lexical-handler", lexicalHandler);
if (isFragment()) {
FragmentContentHandler fragmentHandler = new FragmentContentHandler(contentHandler);
reader.setContentHandler(fragmentHandler);
} else {
reader.setContentHandler(contentHandler);
}
reader.parse(xmlDocument);