source:
trunk/grails-app/utils/SimpleXMLCodec.groovy
@
1699
Last change on this file since 1699 was 1430, checked in by work@…, 12 years ago | |
---|---|
|
|
File size: 285 bytes |
Rev | Line | |
---|---|---|
[1257] | 1 | import org.apache.commons.lang.StringEscapeUtils |
2 | ||
3 | class SimpleXMLCodec { | |
4 | ||
5 | static encode = { theTarget -> | |
6 | StringEscapeUtils.escapeXml(theTarget.toString()) | |
7 | } | |
8 | ||
9 | static decode = { theTarget -> | |
10 | StringEscapeUtils.unescapeXml(theTarget.toString()) | |
11 | } | |
12 | } |
Note: See TracBrowser
for help on using the repository browser.