code: private static InputStream render(final Node dom,
          final XeSource src) throws IOException {
          final Node copy = cloneNode(dom);
          final ByteArrayOutputStream baos =
              new ByteArrayOutputStream();
          final Node node = new Xembler(src.toXembly()).applyQuietly(copy);
          try {
              TransformerFactory.newInstance().newTransformer().transform(
                  new DOMSource(node),
                  new StreamResult(
                      new Utf8OutputStreamContent(baos)
                  )
              );
          } catch (final TransformerException ex) {
              throw new IllegalStateException(ex);
          }
          return new ByteArrayInputStream(baos.toByteArray());
      }
docs: Render source as XML.
  @param dom DOM node to build upon
  @param src Source
  @return XML
  @throws IOException If fails