I want to do some template by using golang,and want to ommit some tags from a xml like xlsx. the xml source like this:
input := `<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Worksheet ss:Name="sheet1">
<Names>
<NamedRange ss:Name="_FilterDatabase" ss:RefersTo="=sheet!R3C1:R3C13"
ss:Hidden="1"/>
</Names>
<Table ss:ExpandedColumnCount="15" ss:ExpandedRowCount="7" x:FullColumns="1"
x:FullRows="1" ss:DefaultColumnWidth="52.8" ss:DefaultRowHeight="15.45">
<Column ss:AutoFitWidth="0" ss:Width="37.200000000000003"/>
<Column ss:AutoFitWidth="0" ss:Width="67.2"/>
<Column ss:AutoFitWidth="0" ss:Width="75.600000000000009"/>
<Column ss:AutoFitWidth="0" ss:Width="71.400000000000006"/>
<Row ss:AutoFitHeight="0">
<Cell ss:MergeAcross="12" ss:MergeDown="1" ss:StyleID="s63"><Data
ss:Type="String">This is a title of the sheet!</Data></Cell>
</Row>
<Row ss:AutoFitHeight="0">
<Cell ss:StyleID="s69"><Data ss:Type="String">{{range $prj:=.prj}}</Data></Cell>
<Cell ss:StyleID="s70"/>
<Cell ss:StyleID="s70"/>
<Cell ss:StyleID="s70"/>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="45.449999999999996">
<Cell ss:StyleID="s72"/>
<Cell ss:StyleID="s70"><Data ss:Type="String">{{$prj.PrjName}}</Data></Cell>
<Cell ss:StyleID="s70"><Data ss:Type="String">{{$prj.ConstrDept}}</Data></Cell>
<Cell ss:StyleID="s71"><Data ss:Type="String">{{$prj.Assumer}}</Data></Cell>
<Cell ss:StyleID="s71"><Data ss:Type="String">{{$prj.ReplyNo}}</Data></Cell>
<Cell ss:StyleID="s71"><Data ss:Type="String">{{$prj.AnPingNo}}</Data></Cell>
</Row>
<Row ss:AutoFitHeight="0">
<Cell ss:StyleID="s73"><Data ss:Type="String">{{end}}</Data></Cell>
</Row>
</Table>
</Worksheet>
</Workbook>`
and i want to get as following:
{{range $prj:=.prj}}
in this row,i only want to get the "
{{range $prj:=.prj}}
",and ommit the tag around the "<Row>
"
2.
<Row ss:AutoFitHeight="0">
<Cell ss:StyleID="s73"><Data ss:Type="String">{{end}}</Data></Cell>
</Row>
in the row, i only want to get the "{{end}}
",and ommit the tag around the "<Row>
"
- any other tag ,i want to remain. how to do?