Takes a potential expression and converts it into XML form. @param expression The expression to convert @return XML view
(String expression)
| 72 | * @return XML view |
| 73 | */ |
| 74 | public static String getExprInXml(String expression) { |
| 75 | String returnString; |
| 76 | int length = expression.length(); |
| 77 | |
| 78 | if (expression.startsWith(OPEN_EXPR) && expression.endsWith(CLOSE_EXPR)) { |
| 79 | returnString = expression.substring(1, length - 1); |
| 80 | } else { |
| 81 | returnString = expression; |
| 82 | } |
| 83 | |
| 84 | return Escape.xml(returnString); |
| 85 | } |
| 86 | |
| 87 | /** |
| 88 | * Checks to see if the given scope is valid. |
no test coverage detected