use of io.restassured.assertion.XMLAssertion in project rest-assured by rest-assured.
the class XmlPath method getFromPath.
private <T> T getFromPath(String path, boolean convertToJavaObject) {
final GPathResult input = lazyXmlParser.invoke();
final XMLAssertion xmlAssertion = new XMLAssertion();
if (params != null) {
xmlAssertion.setParams(params);
}
final String root = rootPath.equals("") ? rootPath : rootPath.endsWith(".") ? rootPath : rootPath + ".";
xmlAssertion.setKey(root + path);
return (T) xmlAssertion.getResult(input, convertToJavaObject, true);
}
Aggregations