|
|
|
@ -7,10 +7,6 @@ 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; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -20,6 +16,10 @@ public class XmlKit {
|
|
|
|
|
/** |
|
|
|
|
* 从输入流中读取对象 |
|
|
|
|
* |
|
|
|
|
* @param read xml读取对象 |
|
|
|
|
* @param in xml输入流 |
|
|
|
|
*/ |
|
|
|
|
public static void readInputStreamXML(XMLReadable read, InputStream in) throws Exception { |
|
|
|
|
XMLTools.readInputStreamXML(read, in); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -30,7 +30,9 @@ public class XmlKit {
|
|
|
|
|
* @param reader xml读取器 |
|
|
|
|
* @return java对象 |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
public static XMLable readXMLable(XMLableReader reader) { |
|
|
|
|
return GeneralXMLTools.readXMLable(reader); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 将java对象写为xml文件 |
|
|
|
@ -38,37 +40,10 @@ public class XmlKit {
|
|
|
|
|
* @param writer xml写入器 |
|
|
|
|
* @param xml 实际java对象 |
|
|
|
|
* @param tagName xml标签名 |
|
|
|
|
/** |
|
|
|
|
* 将java对象写为xml文件 |
|
|
|
|
* |
|
|
|
|
* @param writer xml写入器 |
|
|
|
|
* @param xml 实际java对象 |
|
|
|
|
* @param tagName xml标签名 |
|
|
|
|
*/ |
|
|
|
|
public static void readInputStreamXML(XMLReadable xmlReadable, InputStream inputStream) throws Exception { |
|
|
|
|
XMLTools.readInputStreamXML(xmlReadable, inputStream); |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
* 从输入源中读取xml |
|
|
|
|
* @param reader 输入源 |
|
|
|
|
* @return xml文件 |
|
|
|
|
* |
|
|
|
|
*/ |
|
|
|
|
public static XMLable readXMLable(XMLableReader reader) { |
|
|
|
|
return GeneralXMLTools.readXMLable(reader); |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
* 写XMLable |
|
|
|
|
* @param writer 输出源 |
|
|
|
|
* @param xml xml文件 |
|
|
|
|
* @param tagName 标签名 |
|
|
|
|
* @return 节点名 |
|
|
|
|
* |
|
|
|
|
*/ |
|
|
|
|
public static void writeXMLable(XMLPrintWriter writer, XMLable xml, String tagName) { |
|
|
|
|
GeneralXMLTools.writeXMLable(writer, xml, tagName); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |