@Override public void writeStartDocument(String encoding,String version) throws XMLStreamException {
  log.log(Level.FINE,"writeStartDocument({0}, {1})",new Object[]{encoding,version});
  if (encoding == null) {
    encoding=this.encoding;
  }
  doc=new WbXmlDocument(WbXmlVersion.VERSION_1_3,IanaCharset.getIanaCharset(encoding));
  if (def != null) {
    log.log(Level.FINE,"Setting definition {0}",def.getName());
    doc.setDefinition(def);
  }
}

@ Override public void writeStartDocument ( String encoding , String version ) throws XMLStreamException { log . log ( Level . FINE , "writeStartDocument({0}, {1})" , new Object [ ] { encoding , version } ) ; if ( encoding == null ) { encoding = this . encoding ; } doc = new WbXmlDocument ( WbXmlVersion . VERSION_1_3 , IanaCharset . getIanaCharset ( encoding ) ) ; if ( def != null ) { log . log ( Level . FINE , "Setting definition {0}" , def . getName ( ) ) ; doc . setDefinition ( def ) ; } }
write the xml declaration . defaults the xml version to 1 . 0 , and the encoding to utf - 8 . in wbxml stream the version is always set to 1 . 3 ( other versions are not supported ) .
