dev --- 3.8.0.A版本, openProject引用 ; formao-live --- 3.7.0.B 版本, formallProject引用
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 line
521 B

  1. package me.chanjar.weixin.util.xml;
  2. import javax.xml.bind.annotation.adapters.XmlAdapter;
  3. /**
  4. *
  5. * http://stackoverflow.com/questions/14193944/jaxb-marshalling-unmarshalling-with-cdata
  6. *
  7. * @author chanjarster
  8. *
  9. */
  10. public class AdapterCDATA extends XmlAdapter<String, String> {
  11. @Override
  12. public String marshal(String arg0) throws Exception {
  13. return "<![CDATA[" + arg0 + "]]>";
  14. }
  15. @Override
  16. public String unmarshal(String arg0) throws Exception {
  17. return arg0;
  18. }
  19. }