Code example for Attr

Methods: getLocalName, getNamespaceURI, getPrefix, getValue, isId

0
 
    /** {@inheritDoc} */ 
    protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
        XSAny xsAny = (XSAny) xmlObject;
 
        QName attribQName = XMLHelper.constructQName(attribute.getNamespaceURI(), attribute.getLocalName(), attribute
                .getPrefix());
 
        if (attribute.isId()) {
            xsAny.getUnknownAttributes().registerID(attribQName);
        } 
 
        xsAny.getUnknownAttributes().put(attribQName, attribute.getValue());
    } 
 
    /** {@inheritDoc} */ 
    protected void processElementContent(XMLObject xmlObject, String elementContent) {
        XSAny xsAny = (XSAny) xmlObject;
 
        xsAny.setTextContent(elementContent);
    }