<p>
XML-escapes all the elements in the target array.
</p>

@param target the array of Strings to be escaped.
If non-String objects, toString() will be called.

@return a String[] with the result of each
each element of the target.

@since 2.0.9
763247
public String[] arrayEscapeXml(final Object[] target) {
        if (target == null) {
            return null;
        }
        final String[] result = new String[target.length];
        for (int i = 0; i < target.length; i++) {
            result[i] = escapeXml(target[i]);
        }
        return result;
    }
434381
private static String escapeXml (String nonEscapedXmlStr) {
        StringBuilder escapedXML = new StringBuilder();
        for (int i = 0; i < nonEscapedXmlStr.length(); i++) {
            char c = nonEscapedXmlStr.charAt(i);
            switch (c) {
                case '<':
                    escapedXML.append("&lt;");
                    break;
                case '>':
                    escapedXML.append("&gt;");
                    break;
                case '\"':
                    escapedXML.append("&quot;");
                    break;
                case '&':
                    escapedXML.append("&amp;");
                    break;
                case '\'':
                    escapedXML.append("&apos;");
                    break;
                default:
                    if (c > 0x7e) {
                        escapedXML.append("&#" + ((int) c) + ";");
                    } else {
                        escapedXML.append(c);
                    }
            }
        }
        return escapedXML.toString();
    }
433498
public String[] arrayUnescapeJava(final Object[] target) {
        if (target == null) {
            return null;
        }
        final String[] result = new String[target.length];
        for (int i = 0; i < target.length; i++) {
            result[i] = unescapeJava(target[i]);
        }
        return result;
    }
847506
public String format(String[] words, String[] target) {
		StringBuilder sb = new StringBuilder();
		for(int j=0;j<words.length;j++){
			sb.append(words[j]);
			if(Chars.isWhiteSpace(words[j]))//空格不输出词性
				continue;
			sb.append("/");
			sb.append(target[j]);
			if(j<words.length-1)
				sb.append(delim);
		} 
		String res = sb.toString();
		return res;
	}
800024
public String unescapeJava(final Object target) {
        if (target == null) {
            return null;
        }
        return StringUtils.unescapeJava(target);
    }
291576
public function escape(string $target = EscapeTarget::HTML)
    {
        switch ($target) {
            case EscapeTarget::ATTRIBUTE:
                return $this->escapeAttribute();
            case EscapeTarget::JS:
                return $this->escapeJS();
            case EscapeTarget::HTML:
            default:
                return $this->escapeHTML();
        }
    }
1254324
public static String unescapeJava(final Object target) {
        if (target == null) {
            return null;
        }
        return JavaEscape.unescapeJava(target.toString());
    }
1251971
public String escapeXml(final Object target) {
        if (target == null) {
            return null;
        }
        return StringUtils.escapeXml(target);
    }
741718
@Override
  public final String escapeXml(final String pSource) throws Exception {
    StringBuffer sb = new StringBuffer();
    for (int i = 0; i < pSource.length(); i++) {
      char ch = pSource.charAt(i);
      sb.append(xmlEscape(ch));
    }
    return sb.toString();
  }
1251344
protected Object[] escape(final Format format, Object... args) {
        // Transformer that escapes HTML,XML,JSON strings
        Transformer<Object, Object> escapingTransformer = new Transformer<Object, Object>() {
            @Override
            public Object transform(Object object) {
                return format.escapeValue(object);
            }
        };
        List<Object> list = Arrays.asList(ArrayUtils.clone(args));
        CollectionUtils.transform(list, escapingTransformer);
        return list.toArray();
    }
1028406
@NotNull
    public static String[] toArrayWithEscaped(@Nullable final String stringArray, @NotNull final String delimiter) {
        if (StringUtils.isEmpty(stringArray)) {
            return new String[0];
        }
        return StringUtils.splitByWholeSeparatorPreserveAllTokens(stringArray, delimiter);
    }
1316132
public static String[] getAllMarksArray() {
        Set<String> keySet = markNamesToDef.keySet();
        return (String[]) keySet.toArray(new String[keySet.size()]);
    }
822269
private static String escapeXml(final String text, final XmlEscapeSymbols symbols,
                                    final XmlEscapeType type, final XmlEscapeLevel level) {

        if (type == null) {
            throw new IllegalArgumentException("The 'type' argument cannot be null");
        }

        if (level == null) {
            throw new IllegalArgumentException("The 'level' argument cannot be null");
        }

        return XmlEscapeUtil.escape(text, symbols, type, level);

    }
121827
public final String escape(String in) {
        if (in == null)
            return "";

        if (in.trim()
                  .equals(""))
            return in;

        if (in.trim()
                  .length() == 0)
            return in;

        in = in.replaceAll(
                "&",
                "&amp;"
            );
        in = in.replaceAll(
                "<",
                "&lt;"
            );
        in = in.replaceAll(
                ">",
                "&gt;"
            );

        StringBuffer result = new StringBuffer();
        char chars[] = in.toCharArray();

        for (int i = 0; i < chars.length; i++) {
            if ((chars[i] >= 127) && (chars[i] < 160)) {
                chars[i] = 32;
                result.append(chars[i]);
            } else if (chars[i] == 160) {
                result.append("&#160;");
            } else if (chars[i] == 9) {
                result.append(" ");
            } else if ((chars[i] < 32) && (chars[i] != 9) && (chars[i] != 10)
                    && (chars[i] != 13)
            ) {
                chars[i] = 32;
                result.append(chars[i]);
            } else {
                result.append(chars[i]);
            }
        }

        in = result.toString();

        return in;
    }
754858
private static String getLinkNameSpace(String target)
	{
		int pos = target.indexOf(':');
		if (pos == -1)
		{
			return null;
		}
		else
		{
			return target.substring(0, pos).replace('_', ' ').trim()
					.toLowerCase();
		}
	}
1279770
public String xml(String text) {
        if (text == null || text.isEmpty()) {
            return text;
        }
        return StringEscapeUtils.escapeXml11(text);
    }
436507
private Set<String> createTargetList(String targets) throws PauseableComponentControllerRequestFailedException {

        Set<String> targetSet = new HashSet<String>();

        if (targets != null && !targets.equals("")) {
            String targetsList[] = targets.split(",");
            targetSet.addAll(Arrays.asList(targetsList));
        }

        return targetSet;
    }