Tuesday, 28 July 2015

XML indentation in Unix

I have an XML file with no proper indentation.It has to be changed as XML tags indented.

Input:My input file looks like 

<a><b>c</b></a>
Output:
$ xmllint --format <myfilename>
<a>
  <b>c</b>
</a>

No comments:

Post a Comment