<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Converting string to XML in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/converting-string-to-xml/qaa-p/8042849#M2870183</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt;Just wanted to know that is there any "out of the box" feature to do the same&lt;/P&gt;&lt;P&gt;Answer is NO. I would use XSLT Mapping or Java mapping to achieve this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Jul 2011 13:44:53 GMT</pubDate>
    <dc:creator>baskar_gopalakrishnan2</dc:creator>
    <dc:date>2011-07-28T13:44:53Z</dc:date>
    <item>
      <title>Converting string to XML</title>
      <link>https://community.sap.com/t5/technology-q-a/converting-string-to-xml/qaq-p/8042846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Dear All,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using PI 7.1 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to invoke a third party SOAP API which accepts request in the form of a string which has embedded xml and also return a string which has xml embedded in it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;To send the xml as string, I used the feature "Retun as XML" in mapping and it worked fine.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the response which has xml embedded, needs to be converted back to XML message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I understand that we can write parsers in java, ABAP and also do XSLT mapping.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Just wanted to know that is there any "out of the box" feature to do the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please refrain from providing links to java mappings or xslt as I have gone through them already.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Piyush&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2011 13:00:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/converting-string-to-xml/qaq-p/8042846</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-28T13:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: Converting string to XML</title>
      <link>https://community.sap.com/t5/technology-q-a/converting-string-to-xml/qaa-p/8042847#M2870181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if the question is around out of the box feature, then the answer is NO&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2011 13:12:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/converting-string-to-xml/qaa-p/8042847#M2870181</guid>
      <dc:creator>Shabarish_Nair</dc:creator>
      <dc:date>2011-07-28T13:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: Converting string to XML</title>
      <link>https://community.sap.com/t5/technology-q-a/converting-string-to-xml/qaa-p/8042848#M2870182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your XMl is well formed then you can directly handle it in graphical Mapping .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your string response contain xml declaration  &amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/P&gt;&lt;P&gt;then you can using UDF or java/xsl remove it. Then your output will be an well formed xml &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;ns0:MT_Test_Receiver xmlns:ns0="http://testinterface.com"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;Item&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;ResonsefromSOAP&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;test&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;/ResonsefromSOAP&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/Item&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/ns0:MT_Test_Receiver&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;ns0:MT_Test_Receiver xmlns:ns0="http://testinterface.com"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;Item&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;ResonsefromSOAP&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;test&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;/ResonsefromSOAP&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/Item&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/ns0:MT_Test_Receiver&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2011 13:16:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/converting-string-to-xml/qaa-p/8042848#M2870182</guid>
      <dc:creator>former_member854360</dc:creator>
      <dc:date>2011-07-28T13:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: Converting string to XML</title>
      <link>https://community.sap.com/t5/technology-q-a/converting-string-to-xml/qaa-p/8042849#M2870183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt;Just wanted to know that is there any "out of the box" feature to do the same&lt;/P&gt;&lt;P&gt;Answer is NO. I would use XSLT Mapping or Java mapping to achieve this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2011 13:44:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/converting-string-to-xml/qaa-p/8042849#M2870183</guid>
      <dc:creator>baskar_gopalakrishnan2</dc:creator>
      <dc:date>2011-07-28T13:44:53Z</dc:date>
    </item>
    <item>
      <title>Re: Converting string to XML</title>
      <link>https://community.sap.com/t5/technology-q-a/converting-string-to-xml/qaa-p/8042850#M2870184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use DOM or SAX API for XML parsing. SAX is preferred as it is more memory intensive provided there is no need to modify the XML.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2011 14:19:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/converting-string-to-xml/qaa-p/8042850#M2870184</guid>
      <dc:creator>former_member200339</dc:creator>
      <dc:date>2011-07-28T14:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: Converting string to XML</title>
      <link>https://community.sap.com/t5/technology-q-a/converting-string-to-xml/qaa-p/8042851#M2870185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Debashish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My response is as below and I tried it already in graphical mapping but it doesnt work.&lt;/P&gt;&lt;P&gt;If you have trued this approach then please have a look at the response that I have and plz chek if it can be directly converted to xml structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;?xml version="1.0" encoding="UTF-8" standalone="yes" ?&amp;gt; &lt;/P&gt;&lt;P&gt;- &amp;lt;!--  XML Validation Inbound Channel Response &lt;/P&gt;&lt;P&gt;  --&amp;gt; &lt;/P&gt;&lt;P&gt;- &amp;lt;ns1:AuthenticateResponse xmlns:ns1="urn:Login" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"&amp;gt;&lt;/P&gt;&lt;P&gt;  &amp;lt;return xsi:type="xsd:string"&amp;gt;&amp;lt;?xml version="1.0"?&amp;gt;&amp;lt;MessageResponse sessionid=";jsessionid=FxZLTxtJnXJttpW6gMhJ06kyn00tfSgjt9ZwbzJ55CXGn92S8L6f!-444760742!1311845684753" status="SUCCESS" topicprefix="ND-DSK-117.CXL_HMEL_DB"&amp;gt;&amp;lt;Entity name="REF_PERSON"&amp;gt;&amp;lt;Property name="last_access_dt" value="20110728145937" type="DATE"/&amp;gt;&amp;lt;Property name="modify_person_num" value="21" type="INTEGER"/&amp;gt;&amp;lt;Property name="persontopic" value="350523952" type="STRING"/&amp;gt;&amp;lt;Property name="login_result_ind" value="0" type="INTEGER"/&amp;gt;&amp;lt;Property name="login_result_reason" value="" type="STRING"/&amp;gt;&amp;lt;Property name="bypass_drafts" value="0" type="STRING"/&amp;gt;&amp;lt;Property name="stl_check_swap_option_pricing_end" value="1" type="BOOLEAN"/&amp;gt;&amp;lt;Property name="stl_update_provisional_cashflows" value="0" type="BOOLEAN"/&amp;gt;&amp;lt;Property name="stl_autoinvoice_costs" value="1" type="BOOLEAN"/&amp;gt;&amp;lt;Property name="stl_allow_payments_from_agents" value="0" type="BOOLEAN"/&amp;gt;&amp;lt;Property name="stl_payment_allocation_at_invoice_detail_level" value="1" type="BOOLEAN"/&amp;gt;&amp;lt;Property name="last_db_reloaded_on" value="" type="DATE"/&amp;gt;&amp;lt;Property name="xl_mode_ind" value="0" type="INTEGER"/&amp;gt;&amp;lt;Property name="Xchange_enabled" value="1" type="INTEGER"/&amp;gt;&amp;lt;Property name="Xchange_server" value="XCHANGE" type="STRING"/&amp;gt;&amp;lt;Property name="ipaddress" value="10.60.4.80" type="STRING"/&amp;gt;&amp;lt;Property name="appname" value="CommodityXL" type="STRING"/&amp;gt;&amp;lt;Property name="version" value="7.XL7.08.17E" type="STRING"/&amp;gt;&amp;lt;Property name="econfirm.server.enabled" value="0" type="BOOLEAN"/&amp;gt;&amp;lt;/Entity&amp;gt;&amp;lt;/MessageResponse&amp;gt;&amp;lt;/return&amp;gt; &lt;/P&gt;&lt;P&gt;  &amp;lt;/ns1:AuthenticateResponse&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Piyush&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2011 04:30:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/converting-string-to-xml/qaa-p/8042851#M2870185</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-29T04:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: Converting string to XML</title>
      <link>https://community.sap.com/t5/technology-q-a/converting-string-to-xml/qaa-p/8042852#M2870186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Piyush,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The best approach, I would feel to handle it with Java Mapping.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2011 05:15:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/converting-string-to-xml/qaa-p/8042852#M2870186</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-29T05:15:04Z</dc:date>
    </item>
    <item>
      <title>Re: Converting string to XML</title>
      <link>https://community.sap.com/t5/technology-q-a/converting-string-to-xml/qaa-p/8042853#M2870187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Piyush,&lt;/P&gt;&lt;P&gt;                  All parsers will fail to parse the XML message you are getting. Since you are getting the following tag twice within the XMl&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
"&amp;lt;?xml version="1.0"?&amp;gt;" 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; This tag can be present in an document only once in begining of the document. First you need to remove this tag from appearing in source.&lt;/P&gt;&lt;P&gt;Suppose you are able to do that then your XML structure will become something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&amp;lt;?xml version="1.0" encoding="UTF-8" standalone="yes" ?&amp;gt; 
&amp;lt;ns1:AuthenticateResponse xmlns:ns1="urn:Login" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"&amp;gt;
&amp;lt;return xsi:type="xsd:string"&amp;gt;&amp;lt;MessageResponse sessionid=";jsessionid=FxZLTxtJnXJttpW6gMhJ06kyn00tfSgjt9ZwbzJ55CXGn92S8L6f!-444760742!1311845684753" status="SUCCESS" topicprefix="ND-DSK-117.CXL_HMEL_DB"&amp;gt;&amp;lt;Entity name="REF_PERSON"&amp;gt;&amp;lt;Property name="last_access_dt" value="20110728145937" type="DATE"/&amp;gt;&amp;lt;Property name="modify_person_num" value="21" type="INTEGER"/&amp;gt;&amp;lt;Property name="persontopic" value="350523952" type="STRING"/&amp;gt;&amp;lt;Property name="login_result_ind" value="0" type="INTEGER"/&amp;gt;&amp;lt;Property name="login_result_reason" value="" type="STRING"/&amp;gt;&amp;lt;Property name="bypass_drafts" value="0" type="STRING"/&amp;gt;&amp;lt;Property name="stl_check_swap_option_pricing_end" value="1" type="BOOLEAN"/&amp;gt;&amp;lt;Property name="stl_update_provisional_cashflows" value="0" type="BOOLEAN"/&amp;gt;&amp;lt;Property name="stl_autoinvoice_costs" value="1" type="BOOLEAN"/&amp;gt;&amp;lt;Property name="stl_allow_payments_from_agents" value="0" type="BOOLEAN"/&amp;gt;&amp;lt;Property name="stl_payment_allocation_at_invoice_detail_level" value="1" type="BOOLEAN"/&amp;gt;&amp;lt;Property name="last_db_reloaded_on" value="" type="DATE"/&amp;gt;&amp;lt;Property name="xl_mode_ind" value="0" type="INTEGER"/&amp;gt;&amp;lt;Property name="Xchange_enabled" value="1" type="INTEGER"/&amp;gt;&amp;lt;Property name="Xchange_server" value="XCHANGE" type="STRING"/&amp;gt;&amp;lt;Property name="ipaddress" value="10.60.4.80" type="STRING"/&amp;gt;&amp;lt;Property name="appname" value="CommodityXL" type="STRING"/&amp;gt;&amp;lt;Property name="version" value="7.XL7.08.17E" type="STRING"/&amp;gt;&amp;lt;Property name="econfirm.server.enabled" value="0" type="BOOLEAN"/&amp;gt;&amp;lt;/Entity&amp;gt;&amp;lt;/MessageResponse&amp;gt;&amp;lt;/return&amp;gt; 
&amp;lt;/ns1:AuthenticateResponse&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can use the following java mapping code to remove the SOAP envelop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Map;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;

import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

import com.sap.aii.mapping.api.StreamTransformation;
import com.sap.aii.mapping.api.StreamTransformationException;

public class RemoveSoapEnvelopSDN implements StreamTransformation{




public void execute(InputStream in, OutputStream out)
throws StreamTransformationException {


try
{
	DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
	DocumentBuilder builderel=factory.newDocumentBuilder();
	/*input document in form of XML*/
	Document docIn=builderel.parse(in);
	/*document after parsing*/
	Document docOut=builderel.newDocument();
	TransformerFactory tf=TransformerFactory.newInstance();
	Transformer transform=tf.newTransformer();
	Element root;
	Node p;
	
	
	NodeList l;
	int mm,n1;
	//if you need to include namespace use next two lines 
	//root=docOut.createElement("ns0:MessageResponse");
	//root.setAttribute("xmlns:ns0","http://connectsystems.be/MAINFR/AccDocument");
	root=docOut.createElement("MessageResponse");
	p=docIn.getElementsByTagName("MessageResponse").item(0);
	l=p.getChildNodes();
	n1=l.getLength();
	for(mm=0;mm&amp;lt;n1;++mm)
	{
		Node temp=docOut.importNode(l.item(mm),true);
		root.appendChild(temp);
	}	
	docOut.appendChild(root);
	transform.transform(new DOMSource(docOut), new StreamResult(out)); 
}
catch(Exception e)
{
	e.printStackTrace();
}


}

public void setParameter(Map arg0) {


}

public static void main(String[] args) {
try{
	RemoveSoapEnvelopSDN genFormat=new RemoveSoapEnvelopSDN();
	FileInputStream in=new FileInputStream("C:\\Apps\\my folder\\sdn\\sdn6.xml");
	FileOutputStream out=new FileOutputStream("C:\\Apps\\my folder\\sdn\\removedEnvelopSdn6.xml");
	genFormat.execute(in,out);
}
catch(Exception e)
{
e.printStackTrace();
}
}


}

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; You can add attributes to the tags as per your requirement. I have commnented those lines in the java code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The output will look like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://postimage.org/image/2b2czww90/" target="test_blank"&gt;http://postimage.org/image/2b2czww90/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anupam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2011 06:21:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/converting-string-to-xml/qaa-p/8042853#M2870187</guid>
      <dc:creator>anupam_ghosh2</dc:creator>
      <dc:date>2011-07-29T06:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: Converting string to XML</title>
      <link>https://community.sap.com/t5/technology-q-a/converting-string-to-xml/qaa-p/8042854#M2870188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As your target system is sending the xml declaration inside the tag &lt;STRONG&gt;&amp;lt;?xml version="1.0"?&amp;gt;&lt;/STRONG&gt; with the values so you need go for java or xslt mapping to remove this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if it is possible Ask your source system not to send xml declaration . I have removed the xml declaration from the tag and found that its a well formed xml.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2011 06:29:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/converting-string-to-xml/qaa-p/8042854#M2870188</guid>
      <dc:creator>former_member854360</dc:creator>
      <dc:date>2011-07-29T06:29:27Z</dc:date>
    </item>
  </channel>
</rss>

