Code example for Attr

Methods: getValue, isId

0
 
    /** {@inheritDoc} */ 
    protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
        AttributeValueType attributeValue = (AttributeValueType) xmlObject;
 
        QName attribQName = XMLHelper.getNodeQName(attribute);
        if (attribute.isId()) {
            attributeValue.getUnknownAttributes().registerID(attribQName);
        } 
        attributeValue.getUnknownAttributes().put(attribQName, attribute.getValue());
    } 
 
    /** {@inheritDoc} */ 
    protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject)
            throws UnmarshallingException { 
        
        AttributeValueType attributeValue = (AttributeValueType) parentXMLObject;
        attributeValue.getUnknownXMLObjects().add(childXMLObject);  
   } 
 
    /** {@inheritDoc} */