📄 jpdictxml2dbconverter.java
字号:
/* * @(#)JPDictXML2DBConverter.java * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */package ynu.edu.cn.sei.stoneagedict.util;import java.io.File;import java.io.IOException;import javax.xml.parsers.ParserConfigurationException;import javax.xml.parsers.SAXParser;import javax.xml.parsers.SAXParserFactory;import org.xml.sax.SAXException;/** * 将日文词库从xml词库文件中转换到数据库中 * @author zy * @version 1.0.0.0, Mar 18, 2008 */public class JPDictXML2DBConverter { private static SAXParserFactory saxFactory; private static SAXParser saxParser; public static void main(String[] args){ File file = new File("E:\\xdxf.xml"); XMLConverterHandler xmlHandler = new XMLConverterHandler(); saxFactory = SAXParserFactory.newInstance(); saxFactory.setNamespaceAware(true); try { saxParser = saxFactory.newSAXParser(); } catch (ParserConfigurationException ex) { ex.printStackTrace(); } catch (SAXException ex) { ex.printStackTrace(); } try { saxParser.parse(file, xmlHandler); } catch (SAXException ex) { ex.printStackTrace(); } catch (IOException ex) { ex.printStackTrace(); } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -