[
https://issues.apache.org/activemq/browse/CAMEL-2720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=59342#action_59342
]
Willem Jiang commented on CAMEL-2720:
-------------------------------------
Now you can override the default output properties by setting the CamelContext
properties like this
Java DSL
{code}
camelContext.getProperties().put(XmlConverter.OUTPUT_PROPERTIES_PREFIX +
OutputKeys.ENCODING, "US_ASCII");
camelContext.getProperties().put(XmlConverter.OUTPUT_PROPERTIES_PREFIX +
OutputKeys.STANDALONE, "yes");
{code}
or with Spring configuration
{code}
<camelContext>
<properties>
<property key="org.apache.camel.xmlconverter.output.encoding"
value="US_ASCII"/>
property key="org.apache.camel.xmlconverter.output.standalone"
value="yes"/>
</properties>
....
</camelContext>
{code}
> XmlConverter omits XML declaration
> ----------------------------------
>
> Key: CAMEL-2720
> URL: https://issues.apache.org/activemq/browse/CAMEL-2720
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-core
> Reporter: Dragisa Krsmanovic
> Assignee: Willem Jiang
>
> org.apache.camel.converter.jaxp.XmlConverter is hardcoded to omit XML
> declaration when converting DOM document to string. Character encoding
> information is lost that way.
> Ideally there should be a way to override default output properties.
> See:
> http://fisheye6.atlassian.com/browse/camel/trunk/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java?r=HEAD
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.