所以,如果我希望在 Web 应用程序和 Open Office 之间发送数据,那么我感兴趣的实际上不是整个 .odf 文件,只是其中包含的 content.xml。当我查看这个文件时,我看到了什么?它长达 17,629 个字符,包含 23 个 XML 名称空间,63 行样式信息(尽管只有一个样式文件),而且每个单元格还有样式信息。对于桌面电子表格应用程序,这些东西也许可以保留,但是我不希望浪费时间在网络上传递这些不必要的信息,然后解析它,区分它的类别,最后丢弃它。清单 2 给出一个小片段和一行实际数据以供比较:
<table:table-row table:style-name="ro3"> <table:table-cell office:value-type="string"> <text:p>Room of One's Own</text:p> </table:table-cell> <table:table-cell table:style-name="Default" office:value-type="string"> <text:p>Journal</text:p> </table:table-cell> <table:table-cell table:style-name="ce2" office:value-type="string"> <text:p>Hyacinth Blue; Fabrication; Thanksgiving; Spilling the Peas</text:p> </table:table-cell> <table:table-cell table:style-name="ce5" office:value-type="date" office:date-value="2005-05-10"> <text:p>10 May 2005</text:p> </table:table-cell> <table:table-cell table:style-name="ce5" office:value-type="date" office:date-value="2005-09-01"> <text:p>1 Sep 2005</text:p> </table:table-cell> <table:table-cell table:style-name="ce5" office:value-type="date" office:date-value="2006-10-01"> <text:p>1 Oct 2006</text:p> </table:table-cell> <table:table-cell table:style-name="ce5" office:value-type="date" office:date-value="2006-09-01"> <text:p>1 Sep 2006</text:p> </table:table-cell> <table:table-cell office:value-type="string"> <text:p>Hyacinth Blue</text:p> </table:table-cell> <table:table-cell table:style-name="ce6" office:value-type="currency" office:currency="CAD" office:value="50"> <text:p>50.00 CAD</text:p> </table:table-cell> <table:table-cell office:value-type="string"> <text:p>2 Copies of Publication Issue</text:p> </table:table-cell> <table:table-cell table:style-name="ce7" office:value-type="currency" office:currency="CAD" office:value="1.12"> <text:p>1.12 CAD</text:p> </table:table-cell> <table:table-cell table:style-name="ce7" /> <table:table-cell table:number-columns-repeated="244" /> </table:table-row>
(编辑:aniston)
·2024年12月目录 ·2024年11月目录 ·2024年10月目录 ·2024年9月目录 ·2024年8月目录 ·2024年7月目录 ·2024年6月目录 ·2024年5月目录 ·2024年4月目录 ·2024年3月目录 ·2024年2月目录 ·2024年1月目录 ·2023年12月目录 ·2023年11月目录