I have an XML file that is passed to a XML parser, I need to load content from external resource like the following:
<!DOCTYPE foo [<!ELEMENT foo ANY >
<!ENTITY data SYSTEM "file:///d:/data.txt" >]>
<component id="200">
<![CDATA[&data;]]>
</component>
I want the data to be written inside the CDATA tag, however, this just introduces <![CDATA[&data;]]>
and the external resource data is never fetched because of CDATA
tag considered as comment I guess.
The data must be inside CDATA tag to be accepted. How can this be achieved?
Thanks!