public StaxWriterImpl(Naming<N> naming, XMLStreamWriter writer, XmlStreamingFormatter formatter, String encoding, String version)
{
this.naming = naming;
this.writer = writer;
if (formatter == null) formatter = new NoOpFormatter();
this.formatter = formatter;
elementStack.push(new RootElement(writer, formatter, encoding, version));
}