📄 xmlutil.java
字号:
package net.meybo.util;
import java.io.*;
import org.dom4j.*;
/**
* 处理 XML 的工具类,它只被 XMLTool 类使用
* <p>Title: </p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2005</p>
* <p>Company:脉博软件 </p>
* @author:阚吉彬
* @version 1.0
*/
class XMLUtil{
XMLUtil(){
}
protected static void toXmlFile(Document xmlJDoc, String encoding, String fileName) throws FileNotFoundException, IOException {
FileWriter file=new FileWriter(fileName);
xmlJDoc.write(file);
file.close();
}
protected static InputStream getInputStream(String xmlStr) throws Exception {
return new ByteArrayInputStream(xmlStr.getBytes());
}
protected static Document buildDocument(Element el) {
Document doc = null;
doc=DocumentHelper.createDocument(el);
return doc;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -