if (partialValidation) {
if (StringUtils.hasContent(rootElementXPath)) {
SoapUI.log.debug("Root XPath is: " + rootElementXPath);
nodes = xmlHolder.getDomNodes(rootElementXPath);
} else {
AssertionError error = new AssertionError("XPath for validation root element is missing");
throw new AssertionException(error);
}
} else {
XmlObject xmlObject = xmlHolder.getXmlObject();
nodes = new Node[1];
nodes[0] = xmlObject.getDomNode();
}
} catch (XmlException e) {
AssertionError error = new AssertionError(e.getError());
throw new AssertionException(error);
}
if (nodes.length == 0) {
AssertionError error = new AssertionError("XPath '" + rootElementXPath + "' returned no nodes");
throw new AssertionException(error);
}
return nodes;
}