添加通过Document对象进行构造

This commit is contained in:
彭宇琦 2020-10-26 08:28:28 +08:00
parent c977a366e1
commit 96d5b2d149
1 changed files with 9 additions and 1 deletions

View File

@ -48,7 +48,7 @@ public class ReadXml extends AbstractRead {
private Document dom; private Document dom;
/** /**
* 构造对象 * 根据xml文件对象进行构造
* @param xmlFile xml文件对象 * @param xmlFile xml文件对象
* @throws IncorrectFileException xml文件有误时抛出的异常 * @throws IncorrectFileException xml文件有误时抛出的异常
*/ */
@ -62,6 +62,14 @@ public class ReadXml extends AbstractRead {
} }
/**
* 根据xml文件的{@link Document}对象进行构造
* @param dom {@link Document}对象
*/
public ReadXml(Document dom) {
this.dom = dom;
}
@Override @Override
public ArrayList<ByType> findElementByTypeList(String name) { public ArrayList<ByType> findElementByTypeList(String name) {
ArrayList<ByType> byTypeList = new ArrayList<ByType>(); ArrayList<ByType> byTypeList = new ArrayList<ByType>();