commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeevi tesh <jeevitesh...@gmail.com>
Subject Adding CData to xml property
Date Tue, 06 Jan 2015 16:55:40 GMT
Hi,

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>\&lt;![CDATA[TESTCredentialsURLS2]]\&gt;</ResourceURL>


Thanks

jeevitesh

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message