I have XML file with declaration and I need to remove it using XSLT for stylesheet version="2.0" I used <xsl:output method="xml" omit-xml-declaration="yes" /> but it did not work as I think it works with stylesheet version="1.0"
the xml file I have (input)
<?xml version="1.0" encoding="UTF-8"?>
<eExact>
<GLEntries>
<GLEntry>
<Description>Report 2020-08</Description>
<Date>23-09-2020</Date>
<DocumentDate>23-09-2020</DocumentDate>
<Journal code="70"/>
<FinEntryLine number="1">
<GLAccount code="4590"/>
<Creditor code="520094"/>
<Description>Heidi Draaisma</Description>
<Date>23-09-2020</Date>
<Amount>
<Currency code="EUR"/>
<Debit>37.61</Debit>
</Amount>
</FinEntryLine>
</GLEntry>
</GLEntries>
</eExact>
The output I need
<eExact>
<GLEntries>
<GLEntry>
<Description>Report 2020-08</Description>
<Date>23-09-2020</Date>
<DocumentDate>23-09-2020</DocumentDate>
<Journal code="70"/>
<FinEntryLine number="1">
<GLAccount code="4590"/>
<Creditor code="520094"/>
<Description>Heidi Draaisma</Description>
<Date>23-09-2020</Date>
<Amount>
<Currency code="EUR"/>
<Debit>37.61</Debit>
</Amount>
</FinEntryLine>
</GLEntry>
</GLEntries>
</eExact>
<xsl:output omit-xml-declaration="yes"/>and the XSLT processor is in charge of serializing the result tree you shouldn't get an XML declaration in the result document. So you might need to explain to us in more detail which processor you use, how you use it exactly (show us the command line options you use or the exact programming code you have to run the XSLT transformation) to allow us to tell why the declaration appears in the result.