Finally fixed the namespace issue: in xml query we register custom namespace so saml and saml2 namespaces could be used on the xmls, the problem comes at the getAttributes method that use a saml:AttributeValue string to compare with the tagName, that means that saml2:AttributeValue are ignored. To fix it we will use the prefix to build the string that must be compared with