Technical Notes

My online notepad

  • Social

  • Support

    Donate towards my web hosting bill!

How to Use CDATA in Spring Configuration Entries

Posted by Anton Khitrenovich on February 15, 2015

Today I had to create a map in Spring XML configuration file, where both keys and values ought to be XML elements by their own. Obviously, using CDATA is the most readable way to achieve that – but it was not immediately clear how to use CDATA for entry’s key and value attributes.

Here is what I ended with:

<util:map id="patterns">


Leave a Comment

Your email address will not be published. Required fields are marked *