|
|
|
@ -6,18 +6,38 @@ import com.fr.stable.xml.XMLReadable;
|
|
|
|
|
import com.fr.stable.xml.XMLTools; |
|
|
|
|
import com.fr.stable.xml.XMLable; |
|
|
|
|
import com.fr.stable.xml.XMLableReader; |
|
|
|
|
|
|
|
|
|
import com.fr.stable.xml.*; |
|
|
|
|
import com.fr.general.xml.GeneralXMLTools; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.io.InputStream; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* xml读写相关类 |
|
|
|
|
*/ |
|
|
|
|
public class XmlKit { |
|
|
|
|
/** |
|
|
|
|
* 从输入流中读取对象 |
|
|
|
|
* @param xmlReadable xml读取对象 |
|
|
|
|
* @param inputStream xml输入流 |
|
|
|
|
* |
|
|
|
|
XMLTools.readInputStreamXML(read, in); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 将xml读取为具体的java对象 |
|
|
|
|
* |
|
|
|
|
* @param reader xml读取器 |
|
|
|
|
* @return java对象 |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 将java对象写为xml文件 |
|
|
|
|
* |
|
|
|
|
* @param writer xml写入器 |
|
|
|
|
* @param xml 实际java对象 |
|
|
|
|
* @param tagName xml标签名 |
|
|
|
|
/** |
|
|
|
|
* 将java对象写为xml文件 |
|
|
|
|
* |
|
|
|
@ -48,4 +68,7 @@ public class XmlKit {
|
|
|
|
|
public static void writeXMLable(XMLPrintWriter writer, XMLable xml, String tagName) { |
|
|
|
|
GeneralXMLTools.writeXMLable(writer, xml, tagName); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |