public static boolean repair(Node nodeStatusDetail) throws DOMStructureException { Element elementStatusDetail = DOMUtil.getElement(nodeStatusDetail); boolean result = false; NodeList children = elementStatusDetail.getChildNodes(); int numChildren; if (children != null && (numChildren = children.getLength()) > 0) { for (int i = 0; i < numChildren; i++) { Node child = children.item(i); if (DOMUtil.isElement(child)) { if (DOMUtil.isInNamespace(child, XACML3.XMLNS) && XACML3.ELEMENT_MISSINGATTRIBUTEDETAIL.equals(child.getLocalName())) { result = DOMMissingAttributeDetail.repair(child) || result; } else { logger.warn("Unexpected element " + child.getNodeName()); elementStatusDetail.removeChild(child); result = true; } } } } return result; }