Class HandlebarsXPathHelper
- java.lang.Object
-
- com.github.tomakehurst.wiremock.extension.responsetemplating.helpers.HandlebarsHelper<java.lang.String>
-
- com.github.tomakehurst.wiremock.extension.responsetemplating.helpers.HandlebarsXPathHelper
-
- All Implemented Interfaces:
com.github.jknack.handlebars.Helper<java.lang.String>
- Direct Known Subclasses:
HandlebarsSoapHelper
public class HandlebarsXPathHelper extends HandlebarsHelper<java.lang.String>
This class uses javax.xml.xpath.* for reading a xml via xPath so that the result can be used for response templating.
-
-
Field Summary
-
Fields inherited from class com.github.tomakehurst.wiremock.extension.responsetemplating.helpers.HandlebarsHelper
ERROR_PREFIX, ERROR_SUFFIX
-
-
Constructor Summary
Constructors Constructor Description HandlebarsXPathHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
apply(java.lang.String inputXml, com.github.jknack.handlebars.Options options)
protected java.lang.String
getXPathPrefix()
No prefix by default.-
Methods inherited from class com.github.tomakehurst.wiremock.extension.responsetemplating.helpers.HandlebarsHelper
getRenderCache, handleError, handleError, handleError
-
-
-
-
Method Detail
-
apply
public java.lang.Object apply(java.lang.String inputXml, com.github.jknack.handlebars.Options options) throws java.io.IOException
- Throws:
java.io.IOException
-
getXPathPrefix
protected java.lang.String getXPathPrefix()
No prefix by default. It allows to extend this class with a specified prefix. Just overwrite this method to do so.- Returns:
- a prefix which will be applied before the specified xpath.
-
-