on 03-15-2010 2:18 PM
Dear All,
My requirement is to wrap Individual node data of an XML file within CDATA tag and then to wrap the whole XML file within CDATA.
As an example if my XML :
<?xml version="1.0" encoding="utf=8"?>
<MAIN_NODE>
<PHONENUMBER>+31640642821</PHONENUMBER>
<PLANT>NL93</PLANT>
<ORDER>21019410</ORDER>
<PARNR>300146</PARNR>
<PROCESS>SPS</PROCESS>
</MAIN_NODE>
The I need to WRAP whole XML within CDATA and also individual node data within CDATA tag, so finally my XML should appear something like this
<?xml version="1.0" encoding="utf=8"?>
<SAPMESSAGE>
-<BODYTEXT><![CDATA[
<?xml version="1.0" encoding="utf=8"?>
<MAIN_NODE>
<PHONENUMBER><![CDATA[ +31640642821 ]]</PHONENUMBER>
<PLANT><![CDATA[ NL93 ]]</PLANT>
<ORDER><![CDATA[ 21019410 ]]</ORDER>
<PARNR><![CDATA[ 300146 ]]</PARNR>
<PROCESS><![CDATA[ SPS< ]]/PROCESS>
</MAIN_NODE>
]]></BODYTEXT>
</SAPMESSAGE>
Thank you for your help.
Kind Regards,
Ravi
Edited by: Ravi Santani on Mar 15, 2010 3:19 PM
I Have got the solution to this problem, so closing the forum.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.