I have a Java object which is able to configure itself given an XML configuration description (it takes other descriptions as well, but I'm interested in the XML at the moment). I'm wondering if I can embed the XML description directly into a Spring application context description. I'm imagining something like:
<bean id="myXMLConfiguredBean" class="com.example.Foo">
<constructor-arg type="xml">
<myconfig xmlns="http://example.com/foo/config">
<bar>42</bar>
</myconfig>
</constructor-arg>
</bean>
but I have no idea if that - or something like it - is possible. I realise I could embed myconfig in a CDATA section, but that seems a bit ugly.