StaxWriterBuilder builder = buildDefaultWriter(outputStream);
if (!pretty) {
builder.withFormatting(null);
}
StaxWriter<Element> writer = builder.build(Element.class);
marshalNavigation(writer, navigation);
} catch (StaxNavException e) {
throw new BindingException(e);
} catch (XMLStreamException e) {
throw new BindingException(e);