/** * INTERNAL: */ public boolean shouldAddXsiType(XMLMarshaller xmlMarshaller, XMLDescriptor xmlDescriptor, Object originalObject, boolean wasXMLRoot) { if ((xmlDescriptor.getSchemaReference() != null) && xmlMarshaller.shouldWriteTypeAttribute(originalObject, xmlDescriptor, wasXMLRoot)) { return true; } return false; }
/** * INTERNAL: */ public boolean shouldAddXsiType(XMLMarshaller xmlmarshaller, XMLDescriptor xmlDescriptor, Object originalObject, boolean wasXMLRoot) { if ((xmlDescriptor.getSchemaReference() != null) && xmlmarshaller.shouldWriteTypeAttribute(originalObject, xmlDescriptor, wasXMLRoot)) { return true; } return false; }
xmlRow.getNamespaceResolver().put(XMLConstants.SCHEMA_INSTANCE_PREFIX, XMLConstants.SCHEMA_INSTANCE_URL); boolean writeTypeAttribute = shouldWriteTypeAttribute(object, descriptor, isXMLRoot); if (writeTypeAttribute && (descriptor.getSchemaReference() != null) && (descriptor.getSchemaReference().getSchemaContext() != null)) { ((Element) xmlRow.getDOM()).setAttributeNS(XMLConstants.XMLNS_URL, XMLConstants.XMLNS + XMLConstants.COLON + XMLConstants.SCHEMA_INSTANCE_PREFIX, XMLConstants.SCHEMA_INSTANCE_URL);
boolean shouldWriteTypeAttribute = shouldWriteTypeAttribute(object, descriptor, isXMLRoot);