This commit is contained in:
Looly
2024-01-05 12:00:24 +08:00
parent efc4ca63a2
commit 69206406d7
6 changed files with 172 additions and 94 deletions

View File

@@ -12,6 +12,8 @@
package org.dromara.hutool.core.xml;
import org.dromara.hutool.core.text.CharUtil;
import java.util.regex.Pattern;
/**
@@ -30,6 +32,10 @@ public class XmlConstants {
* 字符串常量XML And 符转义 {@code "&" -> "&"}
*/
public static final String AMP = "&";
/**
* The Character '&'.
*/
public static final Character C_AMP = CharUtil.AMP;
/**
* 字符串常量XML 双引号转义 {@code """ -> "\""}
@@ -40,17 +46,41 @@ public class XmlConstants {
* 字符串常量XML 单引号转义 {@code "&apos" -> "'"}
*/
public static final String APOS = "'";
/**
* The Character '''.
*/
public static final Character C_APOS = CharUtil.SINGLE_QUOTE;
/**
* 字符串常量XML 小于号转义 {@code "&lt;" -> "<"}
*/
public static final String LT = "&lt;";
/**
* The Character '&lt;'.
*/
public static final Character C_LT = '<';
/**
* 字符串常量XML 大于号转义 {@code "&gt;" -> ">"}
*/
public static final String GT = "&gt;";
/**
* The Character '&gt;'.
*/
public static final Character C_GT = '>';
/**
* The Character '!'.
*/
public static final Character C_BANG = '!';
/**
* The Character '?'.
*/
public static final Character C_QUEST = '?';
/**
* 在XML中无效的字符 正则
*/