I have a XML file like:
<ns0:component xmlns:ns0="http://www.accellera.org/XMLSchema/IPXACT/1685- 
2014" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.accellera.org/XMLSchema/IPXACT/1685-2014 
http://www.accellera.org/XMLSchema/IPXACT/1685-2014/index.xsd">
    <ns0:vendor>spiritconsortium.org</ns0:vendor>
    <ns0:library>Leon2RTL</ns0:library>
    <ns0:name>ahbbus12</ns0:name>
<ns0:circuitFunctionDescriptions><ns0:name>PLL</ns0:name> 
</ns0:circuitFunctionDescriptions></ns0:component>
But I want a pretty form like:
<ns0:component xmlns:ns0="http://www.accellera.org/XMLSchema/IPXACT/1685- 
    2014" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://www.accellera.org/XMLSchema/IPXACT/1685-2014 
    http://www.accellera.org/XMLSchema/IPXACT/1685-2014/index.xsd">
    <ns0:vendor>spiritconsortium.org</ns0:vendor>
    <ns0:library>Leon2RTL</ns0:library>
    <ns0:name>ahbbus12</ns0:name>
    <ns0:circuitFunctionDescriptions>
       <ns0:name>PLL</ns0:name> 
    </ns0:circuitFunctionDescriptions>
</ns0:component>
and I need to save this as an output file (I mean I need to save the result in another xml file not just print it). I wonder how can I do this?
 
    