title: deserializing CDATA with JacksonXML - UnrecognizedPropertyException
body: <p>I am using jackson libraries (2.5.2) and trying to deserialize some XML that actually has CDATA section.</p>
  
  <p>It seems that Jackson 2.5 added support for CDATA. </p>
  
  <p>Here is my class that has the CDATA:</p>
  
  <pre><code>public class Certificate {
  
  @JacksonXmlProperty(localName = "name", isAttribute = true)
  private String name;
  @JacksonXmlCData
  private String data;
  @JacksonXmlProperty(localName = "date-added", isAttribute = true)
  @JsonFormat(pattern = "EEE MMM d HH:mm:ss z yyyy")
  private Date dateAdded;
  @JsonFormat(pattern = "EEE MMM d HH:mm:ss z yyyy")
  @JacksonXmlProperty(localName = "date-expires", isAttribute = true)
  private Date expirationDate;
  
  
  public void setData(String data) {
      this.data = data;
  }
  
  public String getData() {
      return data;
  }
  
  public String getName() {
      return name;
  }
  
  public Date getDateAdded() {
      return dateAdded;
  }
  
  public void setDateAdded(Date dateAdded) {
      this.dateAdded = dateAdded;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>and I get the following exception. Is there any way at all to deserialize CDATA with jackson at all? </p>
  
  <p>It seems that using JacksonXmlText works fine but when I need to serialize back I need the value to be in CDATA rather than text.</p>
  
  <p>It's my first time using jackson for this so I might be missing something obvious.</p>
  
  <p>Thank you,</p>
  
  <pre><code>com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "" (class com.company.model.Certificate), 
  not marked as ignorable (4 known properties: "date-added", "data", "name", "date-expires"])
  at [Source: com.ctc.wstx.sr.ValidatingStreamReader@3895ed38; line: 23, column: 36] (through reference chain: 
  com.company.model.Configuration["partner"]-&gt;java.util.HashSet[0]-&gt;com.company.model.PartnerConfiguration["config"] 
  -&gt;java.util.HashSet[0]-&gt;com.company.model.HostConfiguration["cert"]-&gt;java.util.HashSet[0]-&gt;com.company.model.Certificate[""]) 
      at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:51) 
      at com.fasterxml.jackson.databind.DeserializationContext.reportUnknownProperty(DeserializationContext.java:817) 
      at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:958) 
      at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1324) 
      at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1302) 
      at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:249) 
      at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:136) 
      at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:245) 
      at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:217) 
      at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:25) 
      at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:523) 
      at com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(FieldProperty.java:101) 
      at com.fasterxml.jackson.databind.deser.impl.BeanPropertyMap.findDeserializeAndSet(BeanPropertyMap.java:285) 
      at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:248) 
      at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:136) 
      at com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer.deserialize(WrapperHandlingDeserializer.java:120)
      at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:245)
      at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:217)
      at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:25)
      at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:523)
      at com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(FieldProperty.java:101)
      at com.fasterxml.jackson.databind.deser.impl.BeanPropertyMap.findDeserializeAndSet(BeanPropertyMap.java:285)
      at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:248)
      at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:136)
      at com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer.deserialize(WrapperHandlingDeserializer.java:120)
      at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:245)
      at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:217)
      at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:25)
      at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:523)
      at com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(FieldProperty.java:101)
      at com.fasterxml.jackson.databind.deser.impl.BeanPropertyMap.findDeserializeAndSet(BeanPropertyMap.java:285)
      at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:248)
      at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:136)
      at com.fasterxml.jackson.dataformat.xml.deser.WrapperHandlingDeserializer.deserialize(WrapperHandlingDeserializer.java:120)
      at com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:3534)
      at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:1936)
      at com.fasterxml.jackson.dataformat.xml.XmlMapper.readValue(XmlMapper.java:196)
      at com.fasterxml.jackson.dataformat.xml.XmlMapper.readValue(XmlMapper.java:171)
  </code></pre>