public void save(String fileName){
  try {
    JAXBContext context=JAXBContext.newInstance("vn.vitk.tok.jaxb");
    Marshaller marshaller=context.createMarshaller();
    marshaller.setProperty(Marshaller.JAXB_ENCODING,"utf-8");
    try {
      OutputStream os=new FileOutputStream(fileName);
      marshaller.marshal(createN(root),os);
      os.close();
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
 catch (  JAXBException e) {
    e.printStackTrace();
  }
}

public void save ( String fileName ) { try { JAXBContext context = JAXBContext . newInstance ( "vn.vitk.tok.jaxb" ) ; Marshaller marshaller = context . createMarshaller ( ) ; marshaller . setProperty ( Marshaller . JAXB_ENCODING , "utf-8" ) ; try { OutputStream os = new FileOutputStream ( fileName ) ; marshaller . marshal ( createN ( root ) , os ) ; os . close ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } catch ( JAXBException e ) { e . printStackTrace ( ) ; } }
marshals the lexicon to an xml file .
