Hi All,
I have a string which is infact an xml data. I want to put this xml data inside a cdata and then set it in my main xml tree:

Currently, when i set my xml data into my main xml tree, the xml data gives me encoding problem.

Java Code:
<ns3:Profiles>
				<ns3:ProfileInfo>
					<ns3:Profile>
						<ns3:Comments>
							<ns3:Comment Name="RAW CACHE DATA">
								<ns3:Text>&lt;RawProfile&gt;&lt;ROWSET type = "AllLinkedParents"&gt;&lt;/ROWSET&gt;&lt;ROWSET type = "AllParents"&gt;&lt;ROWSET type = "organization"&gt;&lt;ROW type = "Raw"&gt;PotsdamInstanceReference [id=33345427, type=organization, code=3254, name=KID for BE Requests, parentId=0, linkedParentIds=null]&lt;/ROW&gt;&lt;ROW type = "Name"&gt;KID for BE Requests&lt;/ROW&gt;&lt;ROW type = "Code"&gt;100004&lt;/ROW&gt;&lt;ROW type = "Id"&gt;33433427&lt;/ROW&gt;&lt;ROW type = "ParentId"&gt;0&lt;/ROW&gt;&lt;/ROWSET&gt;&lt;ROWSET type = "agency"&gt;&lt;ROW type = "Raw"&gt;PotsdamInstanceReference [id=33232008, type=agency, code=B_100004, name=test_agency_de, parentId=0, linkedParentIds=null]&lt;/ROW&gt;&lt;ROW type = "Name"&gt;test_agency_de&lt;/ROW&gt;&lt;ROW type = "Code"&gt;B_100004&lt;/ROW&gt;&lt;ROW type = "Id"&gt;332008&lt;/ROW&gt;&lt;ROW type = "ParentId"&gt;0&lt;/ROW&gt;&lt;/ROWSET&gt;&lt;/ROWSET&gt;&lt;ROWSET type = "Id"&gt;&lt;ROW type = "Raw"&gt;333426&lt;/ROW&gt;&lt;/ROWSET&gt;&lt;ROWSET type = "Code"&gt;&lt;ROW type = "Raw"&gt;B_100004_BE_USER&lt;/ROW&gt;&lt;/ROWSET&gt;&lt;ROWSET type = "Name"&gt;&lt;ROW type = "Raw"&gt;BE User&lt;/ROW&gt;&lt;/ROWSET&gt;&lt;ROWSET type = "Type"&gt;&lt;ROW type = "Raw"&gt;user&lt;/ROW&gt;&lt;/ROWSET&gt;&lt;ROWSET type = "ParentId"&gt;&lt;ROW type = "Raw"&gt;332008&lt;/ROW&gt;&lt;/ROWSET&gt;&lt;ROWSET type = "LinkedParentIds"&gt;&lt;ROW type = "Raw"&gt;[]&lt;/ROW&gt;&lt;/ROWSET&gt;&lt;/RawProfile&gt;</ns3:Text>
							</ns3:Comment>
						</ns3:Comments>
					</ns3:Profile>
				</ns3:ProfileInfo>
			</ns3:Profiles>

I want this xml data (which inside <ns3:Text>) to be set as part of CDATA so that it appears properly.

Could someone please suggest any standard java solution with the help of which i can put my xml data inside CData?

Thanks.