This Confluence has been LDAP enabled, if you are an ASF Committer, please use your LDAP Credentials to login. Any problems file an INFRA jira ticket please.

Child pages
  • How do I use URIs with parameters in XML
Skip to end of metadata
Go to start of metadata

How do I use URIs with parameters in XML?

If you try and use one of the Camel URIs in an Xml Configuration using the URI query parameter notation, such as

 <from uri="direct:start?paramA=1&paramB=2"/>
 <to uri="mock:result"/>

you might get errors such as...

Caused by: org.xml.sax.SAXParseException: The reference to entity
"paramB" must end with the ';' delimiter.

This is because in XML you need to escape some special XML characters like these

Special Character

How to escape it in XML


So if you write the following XML it should work...

 <from uri="direct:start?paramA=1&amp;paramB=2"/>
 <to uri="mock:result"/>
  • No labels