JAXB Parsing with HTML Content in the XML

german95

New Member
I am receiving the following XML (which is produced by a third party):\[code\]<Source>Product Description</Source> <Content>This is dummy text, <p>in highest qualities.<p> </Content>\[/code\]The problem I have is that when I unmarshall the XML to a JAVA Object, I find the 'Content' field to be empty (no errors or exceptions occur, it is just an empty field). The problem is clearly with the HTML text in the 'Content' tag. Since I do not have power of the XML received, is there a proper way in which I can overcome this problem. The following is my Java Pojo with annotations. Thanks in advance.\[code\]public String getSource() { return source;}@XmlElement(name = "Source")public void setSource(String source) { this.source = source;}public String getContent() { return content;}@XmlElement(name = "Content")public void setContent(String content) { this.content = content;}\[/code\]
 
Back
Top