Results 1 to 1 of 1
Thread: How to put XML data inside CData
- 06-27-2012, 07:13 PM #1
Banned
- Join Date
- Apr 2009
- Posts
- 22
- Rep Power
- 0
How to put XML data inside CData
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><RawProfile><ROWSET type = "AllLinkedParents"></ROWSET><ROWSET type = "AllParents"><ROWSET type = "organization"><ROW type = "Raw">PotsdamInstanceReference [id=33345427, type=organization, code=3254, name=KID for BE Requests, parentId=0, linkedParentIds=null]</ROW><ROW type = "Name">KID for BE Requests</ROW><ROW type = "Code">100004</ROW><ROW type = "Id">33433427</ROW><ROW type = "ParentId">0</ROW></ROWSET><ROWSET type = "agency"><ROW type = "Raw">PotsdamInstanceReference [id=33232008, type=agency, code=B_100004, name=test_agency_de, parentId=0, linkedParentIds=null]</ROW><ROW type = "Name">test_agency_de</ROW><ROW type = "Code">B_100004</ROW><ROW type = "Id">332008</ROW><ROW type = "ParentId">0</ROW></ROWSET></ROWSET><ROWSET type = "Id"><ROW type = "Raw">333426</ROW></ROWSET><ROWSET type = "Code"><ROW type = "Raw">B_100004_BE_USER</ROW></ROWSET><ROWSET type = "Name"><ROW type = "Raw">BE User</ROW></ROWSET><ROWSET type = "Type"><ROW type = "Raw">user</ROW></ROWSET><ROWSET type = "ParentId"><ROW type = "Raw">332008</ROW></ROWSET><ROWSET type = "LinkedParentIds"><ROW type = "Raw">[]</ROW></ROWSET></RawProfile></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.
Similar Threads
-
Extraction of CData Part and later its embedding
By sbutt in forum XMLReplies: 0Last Post: 04-04-2012, 05:35 PM -
Is it possible to capture println data inside variable?
By africanhacker in forum New To JavaReplies: 3Last Post: 12-03-2011, 03:36 PM -
How to Avoid Nested Cdata Sections in a single node when transformation using XSL
By sanjeev1225 in forum XMLReplies: 0Last Post: 03-28-2011, 10:01 AM -
Sending [CDATA] element with SOAP message
By suchismitasuchi in forum Advanced JavaReplies: 0Last Post: 01-19-2009, 11:59 AM -
Data Source :How to get connection inside java
By peiceonly in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 04-02-2007, 11:40 AM
Bookmarks