Code example for Attr

Methods: getLocalName, getNamespaceURI, getOwnerElement, getPrefix, getValue

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