spring-framework / org.springframework.test.web.client.match / MockRestRequestMatchers / xpath

xpath

open static fun xpath(expression: String, vararg args: Any): XpathRequestMatchers

Access to request body matchers using an XPath to inspect a specific subset of the body. The XPath expression can be a parameterized string using formatting specifiers as defined in String#format(String, Object...).

Parameters

expression - the XPath optionally parameterized with arguments

args - arguments to parameterize the XPath expression with

open static fun xpath(expression: String, namespaces: MutableMap<String, String>, vararg args: Any): XpathRequestMatchers

Access to response body matchers using an XPath to inspect a specific subset of the body. The XPath expression can be a parameterized string using formatting specifiers as defined in String#format(String, Object...).

Parameters

expression - the XPath optionally parameterized with arguments

namespaces - namespaces referenced in the XPath expression

args - arguments to parameterize the XPath expression with