Friday, 7 October 2016

XML Assistance in Eclipse - Apache Camel or for Any XSD

Problem:
I have a problem with xml assistance while writing camel routes and tried all the ways I didn't able to get it .


Solution:
In order to get assistance from eclipse using "ctrl+space" , you have to add namespace prefix for expected namespace . Then Eclipse will give you xml assistance.

Error:
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd

<camel:sslContextParameters camelContextId="" id="">
<camel:cipherSuites ></camel:cipherSuites>
</camel:sslContextParameters>
<!-- No XMl Assistance here  ->


</beans>



Solved:

<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:camel="http://camel.apache.org/schema/spring"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd

<camel:sslContextParameters camelContextId="" id="">
<camel:cipherSuites ></camel:cipherSuites>
</camel:sslContextParameters>

<!--  XML Assistance working here -->

</beans>


No comments:

Post a Comment

Please comment here