/** {@inheritDoc} */ public void marshallAttributes(XMLObject samlElement, Element domElement) throws MarshallingException { SubjectLocality subjectLocality = (SubjectLocality) samlElement; if (subjectLocality.getIPAddress() != null) { domElement.setAttributeNS(null, SubjectLocality.IPADDRESS_ATTRIB_NAME, subjectLocality.getIPAddress()); } if (subjectLocality.getDNSAddress() != null) { domElement.setAttributeNS(null, SubjectLocality.DNSADDRESS_ATTRIB_NAME, subjectLocality.getDNSAddress()); } } }