Ejemplo n.º 1
0
 /**
  * 解析结果文件(解析时这个结果文件还是一个骨架文件)
  *
  * @param file
  * @throws Exception
  */
 private void parseOutputFile(String file, String xliffFile) throws Exception {
   VTDGen vg = new VTDGen();
   if (vg.parseFile(file, true)) {
     outputVN = vg.getNav();
     outputXM = new XMLModifier(outputVN);
     outputAP = new AutoPilot(outputVN);
     outputAP.declareXPathNameSpace("sdl", "http://sdl.com/FileTypes/SdlXliff/1.0");
   } else {
     String errorInfo =
         MessageFormat.format(
             Messages.getString("sdl.parse.msg2"), new Object[] {new File(xliffFile).getName()});
     throw new Exception(errorInfo);
   }
 }