I have a unformatted string XML, which has to be converted to XML using XSLT 2.0
Below is the sample unformatted string XML.I tried few XSLT but didnt worked like adding the disable-output-escaping.The Tag opening symbol(<) is not getting displayed,instead of that still the "<" is displayed.So basically need to replace "<" to "<"
<?xml version = "1.0" encoding = "UTF-8"?>
<ns0:Message xmlns:ns0 = "http://www.àbc.com/abc/Message_V2.xsd">
<ns0:Payload>
<ns:EXPINV02-ZEXPINV2-4x xmlns:ae="http://www.àbc.com/abc/05"
xmlns:ns="http://www.àbc.com/abc/IDOCS"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="ns:EXP">
<EDI__DC><TABNAM>EDI_DC40</TABNAM><MANDT>510</MANDT>
<DOCNUM>0000000058569441</DOCNUM><DOCREL>740</DOCREL>
<STATUS>30</STATUS><DIRECT>1</DIRECT><OUTMOD>
2</OUTMOD><EXPRSS xsi:nil="true"/><TEST
xsi:nil="true"/><IDOCTYP>EXPINV02</IDOCTYP>
<CIMTYP>ZEXPINV2</CIMTYP><MESTYP>ZINVOICE0</MESTYP>
<MESCOD xsi:nil="true"/><MESFCT xsi:nil="true"/>
<STD xsi:nil="true"/><STDVRS
xsi:nil="true"/><STDMES>ZINVOI</STDMES>
<SNDPOR>SAPNEQ</SNDPOR><SNDPRT>LS</SNDPRT><SNDPFC
xsi:nil="true"/><SNDPRN>NEQ510</SNDPRN><SNDSAD
xsi:nil="true"/><SNDLAD
xsi:nil="true"/><RCVPOR>NXPINVOICE</RCVPOR><RCVPRT>
LS</RCVPRT><RCVPFC
xsi:nil="true"/><RCVPRN>PSFFORMSCA</RCVPRN><RCVSAD
xsi:nil="true"/><RCVLAD
xsi:nil="true"/><CREDAT>20190715</CREDAT><CRETIM>
152902</CRETIM><REFINT xsi:nil="true"/><REFGRP
xsi:nil="true"/><REFMES xsi:nil="true"/><ARCKEY
xsi:nil="true"/><SERIAL>20190528064107</SERIAL></EDI__DC>
</ns0:Payload>
</ns0:Message>
Expected Output is below:
<?xml version = "1.0" encoding = "UTF-8"?>
<ns0:Message xmlns:ns0 = "http://www.àbc.com/abc/Message_V2.xsd">
<ns0:Payload>
<ns:EXPINV02-ZEXPINV2-4x xmlns:ae="http://www.àbc.com/abc/05"
xmlns:ns="http://www.àbc.com/abc/IDOCS"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="ns:EXP">
<EDI__DC><TABNAM>EDI_DC40</TABNAM><MANDT>510</MANDT>
<DOCNUM>0000000058569441</DOCNUM><DOCREL>740</DOCREL>
<STATUS>30</STATUS><DIRECT>1</DIRECT><OUTMOD>2</OUTMOD><EXPRSS
xsi:nil="true"/><TEST xsi:nil="true"/><IDOCTYP>EXPINV02</IDOCTYP>
<CIMTYP>ZEXPINV2</CIMTYP><MESTYP>ZINVOICE0</MESTYP><MESCOD
xsi:nil="true"/><MESFCT xsi:nil="true"/><STD xsi:nil="true"/><STDVRS
xsi:nil="true"/><STDMES>ZINVOI</STDMES><SNDPOR>SAPNEQ</SNDPOR>
<SNDPRT>LS</SNDPRT><SNDPFC xsi:nil="true"/><SNDPRN>NEQ510</SNDPRN>
<SNDSAD xsi:nil="true"/><SNDLAD xsi:nil="true"/>
<RCVPOR>NXPINVOICE</RCVPOR><RCVPRT>LS</RCVPRT><RCVPFC xsi:nil="true"/>
<RCVPRN>PSFFORMSCA</RCVPRN><RCVSAD xsi:nil="true"/><RCVLAD
xsi:nil="true"/><CREDAT>20190715</CREDAT><CRETIM>152902</CRETIM><REFINT
xsi:nil="true"/><REFGRP xsi:nil="true"/><REFMES xsi:nil="true"/>
<ARCKEY
xsi:nil="true"/><SERIAL>20190528064107</SERIAL></EDI__DC>
</ns0:Payload>
</ns0:Message>
parse-xmlto do this. Having said that, your escaped XML is missing the closingEXPINV02-ZEXPINV2-4xtag, so would not actually be valid at the moment. Thanks!disable-output-escapingshould work - but the escaped string is missing the closing</ns:EXPINV02-ZEXPINV2-4x>tag, so the result will not be a well-formed XML document.