Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3523

how to convert xml file to a string and write that string to another XML file format in XI/PI?

$
0
0

Hi Experts,

I have a requirement in that i need to convert the xml file in to a string and then write it to another file as valid xml format.

i tried few logics but all of those are failed to write converted string to xml file format as it is always taking that string as XML tags but not as a string.

for example my xml was

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

<Students>

<Student_Name>Srinivas</Student_Name>

<Student_FullName>Srinivas_Kumar</Student_FullName>

<DOB>1992-09-25</DOB>

<FlatNo>#04,8th main</FlatNo>

<Locality>GandhiRoad</Locality>

</Students>

expected output should be like

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

<ns0:message>

<Students><Student_Name>Srinivas</Student_Name><Student_FullName>Srinivas_Kumar</Student_FullName><DOB>1992-09-25</DOB><FlatNo>#04,8th main</FlatNo><Locality>GandhiRoad</Locality></Students>

</ns0:message>

please help me in this.


Viewing all articles
Browse latest Browse all 3523

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>