首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 操作系统 > UNIXLINUX >

使用shell编写xml文件,该如何处理

2012-04-14 
使用shell编写xml文件步骤:1.在某个路径下生成xml文件2.编写XML文件内容[解决办法]cat END /tmp/abc.x

使用shell编写xml文件
步骤:
1.在某个路径下生成xml文件
2.编写XML文件内容 


[解决办法]
cat << END >/tmp/abc.xml
<?xml version="1.0"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">

<Worksheet ss:Name="xls1">

 <Table>
<Row>
<Cell><Data ss:Type="String">cell a1</Data></Cell>
<Cell><Data ss:Type="String">cell b2</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="String">cell a2</Data></Cell>
<Cell><Data ss:Type="String">cell b3</Data></Cell>
</Row>
 </Table>
</Worksheet>

</Workbook>
END

热点排行