Blog Archive

Thursday, July 12, 2018

Remove bom Char from xml file  using xslt

Om-tat-sat

handling bom char, utf-8 xml file;
ex:00556159646

using sender file csv, and fcc,
2. java mapping merge payload and attachment
3. intermediate mapping (filter and sort,context  handling)
4. mapping to idoc(failed)

due to bom char,certain values are not coming.

remove dom char after adding xslt program.





<?xml version='1.0' ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns="urn:coach.com:I287-68:Radial:OTC:InterCompanySalesOrder">
    <xsl:output method="xml" byte-order-mark="yes" encoding="UTF-8" indent="no"/>
    <xsl:template match="/">
        <ns:ShippedOrderRecordRadial xmlns:ns="urn:coach.com:I287-68:Radial:OTC:InterCompanySalesOrder">
            <xsl:for-each select="ns:ShippedOrderRecordRadial/Records">
                <Records>
                    <row>
                            <xsl:value-of select="translate(.,'&#65279;','')"/>
                    </row>
                </Records>
            </xsl:for-each>
        </ns:ShippedOrderRecordRadial>
    </xsl:template>
</xsl:stylesheet>

    <!-- <xsl:output method="xml" byte-order-mark="yes" encoding="UTF-8" indent="no"/>-->

No comments:

Post a Comment