protected void setOrAddAttributeValue(UnmarshalRecord unmarshalRecord, Object value, XPathFragment xPathFragment, Object collection){ if (!xmlAnyObjectMapping.usesXMLRoot()) { unmarshalRecord.setAttributeValue(value, xmlAnyObjectMapping); } else { XMLRoot xmlRoot = new XMLRoot(); xmlRoot.setNamespaceURI(xPathFragment.getNamespaceURI()); xmlRoot.setSchemaType(unmarshalRecord.getTypeQName()); xmlRoot.setLocalName(xPathFragment.getLocalName()); xmlRoot.setObject(value); unmarshalRecord.setAttributeValue(xmlRoot, xmlAnyObjectMapping); } }
Object originalObject = objectValue; Node toReplace = getNodeToReplace(root); if (usesXMLRoot() && (objectValue instanceof XMLRoot)) { xmlRootField = new XMLField(); wasXMLRoot = true;
Object originalObject = objectValue; Node toReplace = getNodeToReplace(root); if (usesXMLRoot() && (objectValue instanceof XMLRoot)) { xmlRootField = new XMLField(); wasXMLRoot = true;
public boolean startElement(XPathFragment xPathFragment, UnmarshalRecord unmarshalRecord, Attributes atts) { try { XMLDescriptor workingDescriptor = findReferenceDescriptor(xPathFragment, unmarshalRecord, atts, xmlAnyObjectMapping, xmlAnyObjectMapping.getKeepAsElementPolicy()); UnmarshalKeepAsElementPolicy policy = xmlAnyObjectMapping.getKeepAsElementPolicy(); if (((workingDescriptor == null) && (policy == UnmarshalKeepAsElementPolicy.KEEP_UNKNOWN_AS_ELEMENT)) || (policy == UnmarshalKeepAsElementPolicy.KEEP_ALL_AS_ELEMENT)) { setupHandlerForKeepAsElementPolicy(unmarshalRecord, xPathFragment, atts); }else if (workingDescriptor != null) { processChild(xPathFragment, unmarshalRecord, atts, workingDescriptor, xmlAnyObjectMapping); }else{ AnyMappingContentHandler handler = new AnyMappingContentHandler(unmarshalRecord, xmlAnyObjectMapping.usesXMLRoot()); String qnameString = xPathFragment.getLocalName(); if (xPathFragment.getPrefix() != null) { qnameString = xPathFragment.getPrefix() + XMLConstants.COLON + qnameString; } handler.startElement(xPathFragment.getNamespaceURI(), xPathFragment.getLocalName(), qnameString, atts); unmarshalRecord.getXMLReader().setContentHandler(handler); return true; } } catch (SAXException e) { throw XMLMarshalException.unmarshalException(e); } return true; }
Object originalObject = objectValue; Node toReplace = getNodeToReplace(root); if (usesXMLRoot() && (objectValue instanceof XMLRoot)) { xmlRootField = new XMLField(); wasXMLRoot = true;
Object childObject = childRecord.getCurrentObject(); if (xmlAnyObjectMapping.usesXMLRoot()) { XMLDescriptor workingDescriptor = childRecord.getDescriptor(); if (workingDescriptor != null) {
Object originalValue = objectValue; if (xmlAnyObjectMapping.usesXMLRoot() && (objectValue instanceof XMLRoot)) { xmlRootFragment = new XPathFragment(); wasXMLRoot = true;