public class RequiredElementsBuilder implements AssertionBuilder<OMElement> {
public Assertion build(OMElement element, AssertionBuilderFactory factory) throws IllegalArgumentException {
RequiredElements requiredElements = new RequiredElements(SPConstants.SP_V12);
OMAttribute attrXPathVersion = element.getAttribute(SP12Constants.ATTR_XPATH_VERSION);
if (attrXPathVersion != null) {
requiredElements.setXPathVersion(attrXPathVersion.getAttributeValue());
}
for (Iterator iterator = element.getChildElements(); iterator.hasNext();) {
processElement((OMElement) iterator.next(),requiredElements);
}