'Jackson XML Mapper: how to serialize Java object to org.w3c.dom.Document or javax.xml.transform.dom.DOMResult
It is very easy to serialize Java object to a string using something like:
import com.fasterxml.jackson.dataformat.xml.XmlMapper;
...
public void serialize() throws Exception {
MyPojo object = new MyPojo();
String xml = new XmlMapper().writeValueAsString(object);
}
But I have difficulties understanding how to get org.w3c.dom.Document or javax.xml.transform.dom.DOMResult as a result of this serialization (because I'll be doing XSLT transformation immediately after so I'd like to avoid unnecessary string conversions)?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
