code: @Override
      public void render(DriverRequest httpRequest, String src, Writer out) throws IOException {
          try {
              HtmlDocumentBuilder htmlDocumentBuilder = new HtmlDocumentBuilder();
              htmlDocumentBuilder.setDoctypeExpectation(DoctypeExpectation.NO_DOCTYPE_ERRORS);
              Document document = htmlDocumentBuilder.parse(new InputSource(new StringReader(src)));
              NodeList matchingNodes = (NodeList) expr.evaluate(document, XPathConstants.NODESET);
              XhtmlSerializer serializer = new XhtmlSerializer(out);
              Dom2Sax dom2Sax = new Dom2Sax(serializer, serializer);
              for (int i = 0; i < matchingNodes.getLength(); i++) {
                  dom2Sax.parse(matchingNodes.item(i));
              }
          } catch (XPathExpressionException e) {
              throw new ProcessingFailedException("Failed to evaluate XPath expression", e);
          } catch (SAXException e) {
              throw new ProcessingFailedException("Unable to parse source", e);
          }
      }
docs: {@inheritDoc}