You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Dragisa Krsmanovic (JIRA)" <ji...@apache.org> on 2010/05/13 21:24:17 UTC
[jira] Created: (CAMEL-2720) XmlConverter omits XML declaration
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
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.
[jira] Resolved: (CAMEL-2720) XmlConverter omits XML declaration
Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2720?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Willem Jiang resolved CAMEL-2720.
---------------------------------
Resolution: Fixed
> 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
> Fix For: 2.3.0
>
>
> 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.
[jira] Issue Comment Edited: (CAMEL-2720) XmlConverter omits XML
declaration
Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=59342#action_59342 ]
Willem Jiang edited comment on CAMEL-2720 at 5/14/10 2:58 AM:
--------------------------------------------------------------
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}
was (Author: njiang):
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.
[jira] Commented: (CAMEL-2720) XmlConverter omits XML declaration
Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=59340#action_59340 ]
Willem Jiang commented on CAMEL-2720:
-------------------------------------
I can let XmlConverter check the camelContext property before it decide to omit XML declaration by default :)
> 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.
[jira] Commented: (CAMEL-2720) XmlConverter omits XML declaration
Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Updated: (CAMEL-2720) XmlConverter omits XML declaration
Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2720?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Willem Jiang updated CAMEL-2720:
--------------------------------
Fix Version/s: 2.3.0
> 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
> Fix For: 2.3.0
>
>
> 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.
[jira] Assigned: (CAMEL-2720) XmlConverter omits XML declaration
Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-2720?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Willem Jiang reassigned CAMEL-2720:
-----------------------------------
Assignee: Willem Jiang
> 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.