Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.12.2
-
None
-
Unknown
Description
tokenizeXml does not work or produce value xml output when attributes contain a /.
The test below will fail under 2.12.2
import org.apache.camel.EndpointInject; import org.apache.camel.Produce; import org.apache.camel.ProducerTemplate; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.test.junit4.CamelTestSupport; import org.junit.Test; public class CamelTokenizeXmlTest extends CamelTestSupport { @EndpointInject(uri = "mock:result") protected MockEndpoint resultEndpoint; @Produce(uri = "direct:start") protected ProducerTemplate template; @Test public void testXmlWithSlash() throws Exception { String message = "<parent><child attr='/' /></parent>"; resultEndpoint.expectedBodiesReceived("<child attr='/' />"); template.sendBody(message); resultEndpoint.assertIsSatisfied(); } @Override protected RouteBuilder createRouteBuilder() { return new RouteBuilder() { @Override public void configure() { from("direct:start").split().tokenizeXML("child").to("mock:result"); } }; } }