Conversion of xml to string with characters (XML Doc) Biztalk


hey have formed xml need convert xml doc below ,

well formed schema :

<batch_process><applicant><name last_name="bermuda digital communications" /><address><address_line1>5 reid street kitson building, 2nd floor
hamilton,hm 11
bmu</address_line1><city>hamilton</city><postal_code>hm 11</postal_code><country country_code="bmu" /></address><phone>5637190327</phone><account_number>31000000840</account_number></applicant><applicant><name last_name="blackberry" /><address><address_line1>295 phillip street
waterloo,onn2l 3w8
can</address_line1><city>waterloo</city><state>on</state><postal_code>n2l 3w8</postal_code><country country_code="can" /></address><phone /><account_number>31000000843</account_number></applicant><applicant><name last_name="boolchand pessoomal (b.e) b.v" /><address><address_line1>freezone block d-i # 1
curacao
ant</address_line1><city>curacao</city><country country_code="ant" /></address><phone>5637190347</phone><account_number>31000000846</account_number></applicant><applicant><name last_name="avadanian &amp; associates" /><address><address_line1>281 young harris st suite d pmb 273
blairsville,ga30512
usa</address_line1><city>blairsville</city><state>ga</state><postal_code>30512</postal_code><country country_code="usa" /></address><phone /><account_number>31000000830</account_number></applicant><applicant><name last_name="advantage wireless miami" /><address><address_line1>2700 nw 72 nd ave
miami,fl33122
usa</address_line1><city>miami</city><state>fl</state><postal_code>33122</postal_code><country country_code="usa" /></address><phone>5637190362</phone><account_number>31000000807</account_number></applicant><applicant><name last_name="am wireless uruguay s.a." /><address><address_line1>avenida general san martin 246
montevideo,ury</address_line1><city>montevideo</city><country country_code="ury" /></address><phone>5637190367</phone><account_number>31000000817</account_number></applicant><applicant><name last_name="aeg wireless, inc" /><address><address_line1>1923 mcdonald ave suite b
brooklyn,ny11223
usa</address_line1><city>brooklyn</city><state>ny</state><postal_code>11223</postal_code><country country_code="usa" /></address><phone>5637190381</phone><account_number>31000000808</account_number></applicant><applicant><name last_name="amx paraguay s.a." /><address><address_line1>av. mariscal lopez 1730
asuncion,pry</address_line1><city>asuncion</city><country country_code="pry" /></address><phone>5637190391</phone><account_number>31000000821</account_number></applicant><applicant><name last_name="2p agency usa, inc" /><address><address_line1>1674 east 22nd street 1st floor
brooklyn,ny11229
usa</address_line1><city>brooklyn</city><state>ny</state><postal_code>11229</postal_code><country country_code="usa" /></address><phone>5637190398</phone><account_number>31000000801</account_number></applicant><applicant><name last_name="bahamas telecommunications co." /><address><address_line1>batelco marketing dept.
nassau
bhs</address_line1><city>nassau</city><state>fl</state><postal_code>33054</postal_code><country country_code="bhs" /></address><phone>5637190403</phone><account_number>31000000832</account_number></applicant></batch_process>

need convert to:

        <s:envelope xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'>
         <s:body>
          <ns2:checkapplicants xmlns:ns2='http://webservice.sentinel.truthtechnologies.com/'>
           <arg0>username</arg0>
           <arg1>password</arg1>
           <arg2>
       &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
       &lt;batch_process xmlns:xsi=&quot;http://www.w3.org/2001/xmlschema-instance&quot; &gt;
        xsi:nonamespaceschemalocation=&quot;applicantbatch.xsd&quot;&gt;
        &lt;username&gt;username&lt;/username&gt;
        &lt;applicant&gt;
         &lt;name first_name=&quot;john&quot; middle_name=&quot;&quot; last_name=&quot;doe&quot;/&gt;
         &lt;company_data&gt; &lt;company_name&gt;&lt;/company_name&gt;
          &lt;address&gt;
           &lt;address_line1&gt;&lt;/address_line1&gt;
           &lt;city&gt;&lt;/city&gt;
           &lt;state&gt;&lt;/state&gt;
           &lt;postal_code&gt;&lt;/postal_code&gt;
           &lt;country country_code=&quot;&quot;/&gt;
          &lt;/address&gt;
         &lt;/company_data&gt;
         &lt;account_number&gt;account123&lt;/account_number&gt;
        &lt;/applicant&gt;
        &lt;applicant&gt;
         &lt;name first_name=&quot;jane&quot; middle_name=&quot;&quot; last_name=&quot;doe&quot;/&gt;
         &lt;company_data&gt; &lt;company_name&gt;&lt;/company_name&gt;
          &lt;address&gt;
           &lt;address_line1&gt;&lt;/address_line1&gt;
           &lt;city&gt;&lt;/city&gt;
           &lt;state&gt;&lt;/state&gt;
           &lt;postal_code&gt;&lt;/postal_code&gt;
           &lt;country country_code=&quot;&quot;/&gt;
          &lt;/address&gt;
         &lt;/company_data&gt;
         &lt;account_number&gt;account456&lt;/account_number&gt;
        &lt;/applicant&gt;
        &lt;applicant&gt;
         &lt;name first_name=&quot;?&quot; middle_name=&quot;&quot; last_name=&quot;?&quot;/&gt;
         &lt;company_data&gt; &lt;company_name&gt;&lt;/company_name&gt;
          &lt;address&gt;
           &lt;address_line1&gt;&lt;/address_line1&gt;
           &lt;city&gt;&lt;/city&gt;
           &lt;state&gt;&lt;/state&gt;
           &lt;postal_code&gt;&lt;/postal_code&gt;
           &lt;country country_code=&quot;&quot;/&gt;
          &lt;/address&gt;
         &lt;/company_data&gt;
         &lt;account_number&gt;account456&lt;/account_number&gt;
        &lt;/applicant&gt;
       &lt;/batch_process&gt;
           </arg2>
          </ns2:checkapplicants>
         </s:body>
        </s:envelope>


ashwin

hey tried both link , getting error.can me out.i want create simple project , check how works/

ashwin

we have covered error facing on fresh thread have open this.

refer: https://social.msdn.microsoft.com/forums/en-us/81b8bd77-33fa-41c5-94d6-c4c8ecde1234/converting-lt-and-gt-of-my-xml-file?forum=biztalkgeneral


please mark answer or vote helpful if reply does



BizTalk Server  >  BizTalk Server General



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

BizTalk Server 2013 Azure VM Log Shipping and HA for hosts

How to Share webservice object to all user