Ejemplo n.º 1
0
  /**
   * Copies the current node and its children to the <code>sink</code>.
   *
   * @param sink the output sink
   */
  public void copyNode(OutputStream sink) throws XMLStreamException {
    Assertion.notNull(sink);

    outputFactory.setProperty("javax.xml.stream.isRepairingNamespaces", isNsRepairing);
    final XMLStreamWriter writer = outputFactory.createXMLStreamWriter(sink);

    final DcsStreamSupport dcsStream = new DcsStreamSupport();
    dcsStream.copyNode(in, writer);
    writer.flush();
    writer.close();
  }
Ejemplo n.º 2
0
 /**
  * Copies the current node and its children to the <code>writer</code>.
  *
  * @param writer the writer to write to
  */
 public void copyNode(FDOStaxWriter writer) throws XMLStreamException {
   Assertion.notNull(writer);
   final DcsStreamSupport dcsStream = new DcsStreamSupport();
   dcsStream.copyNode(in, writer.getXMLStreamWriter());
 }