pom.xml:
Code: Select all
VALUE
Code: Select all
@Parameter
private String param1;
Code: Select all
VALUE
Das Basiselement „param1“ darf keine untergeordneten Elemente enthalten.
Also verpacke ich den VALUE in einen CDATA-Block:
Code: Select all
VALUE
]]>
Code: Select all
private void writeMetaInfo(MetaInfo metaInfo, Writer writer) throws IOException {
XmlMapper mapper = new XmlMapper();
new PrintWriter(writer, true).println("");
// metaInfo value is correct before writing - it has not <p>
mapper.writerWithDefaultPrettyPrinter().writeValue(writer, metaInfo);
}
Code: Select all
<p>VALUE</p>
Mobile version