Beispiel #1
0
  @Override
  public void writeItemToResult(final Result result) throws XQException {
    valid(result, Result.class);

    // evaluate different result types...
    if (result instanceof StreamResult) {
      // StreamResult.. directly write result as string
      writeItem(((StreamResult) result).getWriter(), null);
    } else if (result instanceof SAXResult) {
      try {
        // SAXResult.. serialize result to underlying parser
        final SAXSerializer ser = new SAXSerializer(null);
        ser.setContentHandler(((SAXResult) result).getHandler());
        serialize(it, ser);
        ser.close();
      } catch (final IOException ex) {
        throw new BXQException(ex);
      }
    } else {
      Util.notimplemented();
    }
  }
Beispiel #2
0
 @Override
 public void propagate(final DeepFile df) {
   Util.notimplemented();
 }
 @Override
 public Document newDocument() {
   Util.notimplemented();
   return null;
 }