try {
XMLField xmlField = (XMLField)xmlBinaryDataCollectionMapping.getField();
XPathFragment lastFragment = xmlField.getLastXPathFragment();
if(!lastFragment.isAttribute()) {
//set a new content handler to deal with the Include element's event.
BinaryMappingContentHandler handler = new BinaryMappingContentHandler(unmarshalRecord, this, this.xmlBinaryDataCollectionMapping);
String qnameString = xPathFragment.getLocalName();
if (xPathFragment.getPrefix() != null) {
qnameString = xPathFragment.getPrefix() + XMLConstants.COLON + qnameString;
}
handler.startElement(xPathFragment.getNamespaceURI(), xPathFragment.getLocalName(), qnameString, atts);
XMLReader xmlReader = unmarshalRecord.getXMLReader();
xmlReader.setContentHandler(handler);
xmlReader.setLexicalHandler(handler);
} else if (lastFragment.isAttribute()) {
//handle swaRef and inline attribute cases here: