Merge pull request #439 from hotcoffie/wvp-28181-2.0

增强查询录像列表接口兼容性
This commit is contained in:
648540858 2022-04-20 14:16:10 +08:00 committed by GitHub
commit 7145ce07e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,8 +20,8 @@ import java.util.*;
/**
* 基于dom4j的工具包
*
*
*
*
*/
public class XmlUtil {
/**
@ -31,9 +31,9 @@ public class XmlUtil {
/**
* 解析XML为Document对象
*
*
* @param xml 被解析的XMl
*
*
* @return Document
*/
public static Element parseXml(String xml) {
@ -51,7 +51,7 @@ public class XmlUtil {
/**
* 获取element对象的text的值
*
*
* @param em 节点的对象
* @param tag 节点的tag
* @return 节点
@ -62,12 +62,12 @@ public class XmlUtil {
}
Element e = em.element(tag);
//
return null == e ? null : e.getText();
return null == e ? null : e.getText().trim();
}
/**
* 递归解析xml节点适用于 多节点数据
*
*
* @param node node
* @param nodeName nodeName
* @return List<Map<String, Object>>
@ -106,7 +106,7 @@ public class XmlUtil {
/**
* xml转json
*
*
* @param element
* @param json
*/