You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
package com.fanruan.api.xml;
|
|
|
|
|
|
|
|
import com.fr.stable.xml.*;
|
|
|
|
import com.fr.general.xml.GeneralXMLTools;
|
|
|
|
|
|
|
|
import java.io.InputStream;
|
|
|
|
|
|
|
|
public class XmlKit {
|
|
|
|
/**
|
|
|
|
* 从输入流中读取对象
|
|
|
|
* @param xmlReadable xml读取对象
|
|
|
|
* @param inputStream 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);
|
|
|
|
}
|
|
|
|
}
|