Explorar el Código

xml解析工具修改

rengb hace 5 años
padre
commit
271fafc149

+ 20 - 0
trans/src/main/java/com/lantone/qc/trans/changx/util/CxXmlUtil.java

@@ -67,4 +67,24 @@ public class CxXmlUtil {
         return content;
     }
 
+    /**
+     * 判断key是否可用
+     *
+     * @param key
+     * @return
+     */
+    public static boolean keyAvailability(String key) {
+        boolean flag = true;
+        String[] regexs = {
+                "\\d*[+]+\\d*"
+        };
+        for (String regex : regexs) {
+            if (key.matches(regex)) {
+                flag = false;
+                break;
+            }
+        }
+        return flag;
+    }
+
 }