*/
public class EncryptionPropertyMarshaller extends AbstractXMLEncryptionMarshaller {
/** {@inheritDoc} */
protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
EncryptionProperty ep = (EncryptionProperty) xmlObject;
if (ep.getID() != null) {
domElement.setAttributeNS(null, EncryptionProperty.ID_ATTRIB_NAME, ep.getID());
domElement.setIdAttributeNS(null, EncryptionProperty.ID_ATTRIB_NAME, true);
}
if (ep.getTarget() != null) {
domElement.setAttributeNS(null, EncryptionProperty.TARGET_ATTRIB_NAME, ep.getTarget());
}
Attr attribute;
for (Entry<QName, String> entry : ep.getUnknownAttributes().entrySet()) {
attribute = XMLHelper.constructAttribute(domElement.getOwnerDocument(), entry.getKey());
attribute.setValue(entry.getValue());
domElement.setAttributeNodeNS(attribute);
if (Configuration.isIDAttribute(entry.getKey()) || ep.getUnknownAttributes().isIDAttribute(entry.getKey())) {
attribute.getOwnerElement().setIdAttributeNode(attribute, true);
}
}
}