public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
if (currentObject == null) {
initializeRecord(atts);
}
XPathFragment xPathNodeXPathFragment = xPathNode.getXPathFragment();
if((null != xPathNodeXPathFragment && xPathNodeXPathFragment.nameIsText()) || xpathNodeIsMixedContent) {
xpathNodeIsMixedContent = false;
NodeValue xPathNodeUnmarshalNodeValue = xPathNode.getUnmarshalNodeValue();
if (null != xPathNodeUnmarshalNodeValue) {
xPathNodeUnmarshalNodeValue.endElement(xPathFragment, this);
if (xPathNode.getParent() != null) {
xPathNode = xPathNode.getParent();
}
}
}
// set the root element's local name and namespace prefix and look for
// schema locations etc.
if (null == rootElementName && null == rootElementLocalName && parentRecord == null){
rootElementLocalName = localName;
rootElementName = qName;
rootElementNamespaceUri = namespaceURI;
schemaLocation = atts.getValue(XMLConstants.SCHEMA_INSTANCE_URL, XMLConstants.SCHEMA_LOCATION);
noNamespaceSchemaLocation = atts.getValue(XMLConstants.SCHEMA_INSTANCE_URL, XMLConstants.NO_NS_SCHEMA_LOCATION);
}
try {
if (null != selfRecords) {
for (int x = 0, selfRecordsSize = selfRecords.size(); x < selfRecordsSize; x++) {
UnmarshalRecord selfRecord = selfRecords.get(x);
if(selfRecord == null){
getFragmentBuilder().startElement(namespaceURI, localName, qName, atts);
}else{
selfRecord.startElement(namespaceURI, localName, qName, atts);
}
}
}
if(unmappedLevel != -1 && unmappedLevel <= levelIndex) {
levelIndex++;
return;
}
XPathNode node = getNonAttributeXPathNode(namespaceURI, localName, qName, atts);
if(null == node && xPathNode.getTextNode() != null){
XPathFragment textWrapperFragment = getTextWrapperFragment();
if(textWrapperFragment != null && localName.equals(textWrapperFragment.getLocalName())){
node = xPathNode.getTextNode();
}
}
if (null == node) {
NodeValue parentNodeValue = xPathNode.getUnmarshalNodeValue();
if ((null == xPathNode.getXPathFragment()) && (parentNodeValue != null)) {
XPathFragment parentFragment = new XPathFragment();
parentFragment.setNamespaceAware(isNamespaceAware());
if(namespaceURI != null && namespaceURI.length() == 0){
parentFragment.setLocalName(qName);
parentFragment.setNamespaceURI(null);
} else {
parentFragment.setLocalName(localName);
parentFragment.setNamespaceURI(namespaceURI);
}
if (parentNodeValue.startElement(parentFragment, this, atts)) {
levelIndex++;
} else {
// UNMAPPED CONTENT