How to Generate XML with C Data and other Nodes.

Posted by alibasha202-24796 under XML on 11/27/2013 | Points: 10 | Views : 978 | Status : [Member] | Replies : 1
Hi,

I need to do XML serialization on one object and return string. I did that successfully, which is displayed below...

<ISO> <Businesstype>021000</Businesstype> <AgencyId>P</AgencyId>........ </ISO>


But I need that to be generated as in the below format...

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">


<soapenv:Header/>

<soapenv:Body>


<tem:GetResponseXmlForAplus>

<!--Optional:-->

<tem:requestXml>

<![CDATA[<?xml version="1.0" encoding="UTF-8"?>


<ISO>

<Businesstype>021000</Businesstype>

<AgencyId>P</AgencyId>......

</ISO>]]>

</tem:requestXml>

</tem:GetResponseXmlForAplus>


</soapenv:Body>

</soapenv:Envelope>

Because I need to pass this XML request to some other service. Please help me in this regard as soon as possible. Thanks in advance




Responses

Posted by: Bandi on: 11/27/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
REfer
http://stackoverflow.com/questions/15534255/add-cdata-to-an-xml-file
http://www.w3schools.com/xml/xml_cdata.asp
http://stackoverflow.com/questions/18700152/how-to-add-cdata-to-an-xml-file-using-xsl
http://social.technet.microsoft.com/Forums/scriptcenter/en-US/7064e615-e70a-46ca-a4ee-fa4d9edfb375/help-creating-a-new-item-in-xml-with-cdata-added?forum=ITCG

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

alibasha202-24796, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response