code: @Nonnull
    public static ESuccess writeToStream (@Nonnull final Node aNode,
                                          @Nonnull @WillClose final OutputStream aOS,
                                          @Nonnull final IXMLWriterSettings aSettings)
    {
      ValueEnforcer.notNull (aNode, "Node");
      ValueEnforcer.notNull (aOS, "OutputStream");
      ValueEnforcer.notNull (aSettings, "Settings");
  
      try
      {
        final XMLSerializer aSerializer = new XMLSerializer (aSettings);
        aSerializer.write (aNode, aOS);
        return ESuccess.SUCCESS;
      }
      catch (final RuntimeException ex)
      {
        LOGGER.error ("Error in XML serialization", ex);
        throw ex;
      }
      catch (final Exception ex)
      {
        LOGGER.error ("Error in XML serialization", ex);
      }
      finally
      {
        StreamHelper.close (aOS);
      }
      return ESuccess.FAILURE;
    }
docs: Write a node to an {@link OutputStream} using custom settings.
  
  @param aNode
  The node to be serialized. May be any kind of node (incl.
  documents). May not be <code>null</code>.
  @param aOS
  The {@link OutputStream} to write to. May not be <code>null</code>.
  The {@link OutputStream} is closed anyway directly after the
  operation finishes (on success and on error).
  @param aSettings
  The serialization settings to be used. May not be <code>null</code>.
  @return {@link ESuccess}