if (0 == attributeValueNodeList.getLength()) {
continue;
}
Element attributeValueElement = (Element) attributeValueNodeList.item(0);
String attributeValue = attributeValueElement.getChildNodes().item(0).getNodeValue();
NamedValue attribute = new NamedValue(attributeName, attributeValue);
samlAttributes.add(attribute);
}
NodeList attribute2NodeList = document.getElementsByTagNameNS("urn:oasis:names:tc:SAML:2.0:assertion", "Attribute");
for (int idx = 0; idx < attribute2NodeList.getLength(); idx++) {
Element attributeElement = (Element) attribute2NodeList.item(idx);
String attributeName = attributeElement.getAttribute("Name");
NodeList attributeValueNodeList = attributeElement.getElementsByTagNameNS("urn:oasis:names:tc:SAML:2.0:assertion", "AttributeValue");
if (0 == attributeValueNodeList.getLength()) {
continue;
}
Element attributeValueElement = (Element) attributeValueNodeList.item(0);
String attributeValue = attributeValueElement.getChildNodes().item(0).getNodeValue();
NamedValue attribute = new NamedValue(attributeName, attributeValue);
samlAttributes.add(attribute);
}
return samlAttributes;
}