Skip to Content
0
Former Member
Oct 07, 2015 at 06:59 AM

Remove xmlns in xml file

942 Views

Hi All,

how to remove xmlns in input xml. Because it's bring empty value when i call this in atoms

I find following xslt. Where i will use below xslt in atom

<xsl:output method="xml" omit-xml-declaration="yes"/>

<xsl:template match="*">

<xsl:element name="{local-name()}">

<xsl:apply-templates select="@* | node()"/>

</xsl:element>

</xsl:template>

<!-- template to copy attributes -->

<xsl:template match="@*">

<xsl:attribute name="{local-name()}">

<xsl:value-of select="."/>

</xsl:attribute>

</xsl:template>.

This is my xml file.

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

<orders xmlns="http://www.fhjfsj.com/xml/duu/order/2010-10-31">

<order order-no="EU_325278">

<invoice-no>679900</invoice-no>

<customer>

</orders>

</order>

Output in next atom like that below

<orders>

<order order-no="EU_325278">

<invoice-no>679900</invoice-no>

<customer>

</orders>