Code example for Attr

Methods: getLocalName, getNamespaceURI, getOwnerElement, getPrefix, getValue

0
    /** {@inheritDoc} */ 
    protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
        SecurityTokenReference str = (SecurityTokenReference) xmlObject;
         
        QName attribQName = 
            XMLHelper.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute.getPrefix());
        if (SecurityTokenReference.WSU_ID_ATTR_NAME.equals(attribQName)) {
            str.setWSUId(attribute.getValue());
            attribute.getOwnerElement().setIdAttributeNode(attribute, true);
        } else if (SecurityTokenReference.WSSE_USAGE_ATTR_NAME.equals(attribQName)) {
            str.setWSSEUsages(XMLHelper.getAttributeValueAsList(attribute));
        } else { 
            XMLHelper.unmarshallToAttributeMap(str.getUnknownAttributes(), attribute);
        } 
    } 
 
}