@Override protected void createStartDocumentSkeleton(StartDocument startDoc){
  skel=new GenericSkeleton();
  if (!params.omitXMLDeclaration) {
    skel.add("<?xml version=\"" + doc.getXmlVersion() + "\"");
    skel.add(" encoding=\"" + doc.getXmlEncoding() + "\"");
    if (doc.getXmlStandalone()) {
      skel.add(" standalone=\"yes\"");
    }
    skel.add("?>" + lineBreak);
  }
}

@ Override protected void createStartDocumentSkeleton ( StartDocument startDoc ) { skel = new GenericSkeleton ( ) ; if ( ! params . omitXMLDeclaration ) { skel . add ( "<?xml version=\"" + doc . getXmlVersion ( ) + "\"" ) ; skel . add ( " encoding=\"" + doc . getXmlEncoding ( ) + "\"" ) ; if ( doc . getXmlStandalone ( ) ) { skel . add ( " standalone=\"yes\"" ) ; } skel . add ( "?>" + lineBreak ) ; } }
overriding to use xml encoding from the input xml document
