jeevitesh created CONFIGURATION-594:
---------------------------------------
Summary: Adding CData to xml property
Key: CONFIGURATION-594
URL: https://issues.apache.org/jira/browse/CONFIGURATION-594
Project: Commons Configuration
Issue Type: Bug
Components: Type conversion
Affects Versions: 2.0-alpha1
Reporter: jeevitesh
Priority: Critical
Need to add CDATA into XML Property element, but special character are getting
added. Here is my code. Please give your thoughts on the same.
Here is the code.
String cDataTagStart="\\<![CDATA[";
String cDataTagEnd="]]\\>";
credentialsURL =cDataTagStart+credentialsURL+cDataTagEnd;
xmlContentOfMetaData = CredentialProvider.getInstance();
xmlContentOfMetaData.addProperty("Resource(-1).ResourceName", resourceName);
xmlContentOfMetaData.addProperty("Resource.ResourceURL", credentialsURL);
But Special characters are getting added
ResourceName>TESTRESOURCENAME</ResourceName>
<ResourceURL>\<![CDATA[TESTCredentialsURLS2]]\></ResourceURL>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)