Class 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.
    • Constructor Detail

      • HandlebarsXPathHelper

        public HandlebarsXPathHelper()
    • 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.