我正在尝试解析这个 XML
<ssa_admin_tablereports>
<ssa_admin_tablereport_property name='ADM' value=' Tables :0 Partitions : 0 Files : 0 Total size (Archive) : 0 Total size (Update) : 0 Total size (Arc/Upd) : 0%/0% Total size : 0 Total rows : 0 Flat file size (Archive): 0 Flat file size (Update) : 0 Flat file size (Arc/Upd): 0%/0% Flat file size : 0 Compression ratio : not defined '>
</ssa_admin_tablereport_property>
<ssa_admin_tablereport_property name='TORRENT' value=' Tables : 53 Partitions : 97 Files : 194 Total size (Archive) : 1980098 Total size (Update) : 586499 Total size (Arc/Upd) : 77% / 23% Total size : 2566597 Total rows : 213404 Flat file size (Archive): 9189418 Flat file size (Update) : 6830067 Flat file size (Arc/Upd): 57% / 43% Flat file size : 16019485 Compression ratio : 84.0% '>
</ssa_admin_tablereport_property>
</ssa_admin_tablereports>
用于此的 XSLT 是:
<pre><dd>
<table border="1">
<tbody>
<tr>
<th>Table Name</th>
<th>Table Report</th>
</tr>
<xsl:for-each select="ssa_admin_tablereports/ssa_admin_tablereport_property">
<tr>
<td valign="top"><xsl:value-of select="@name"/></td>
<td valign="top"><xsl:value-of select="@value"/></td>
</tr>
</xsl:for-each>
</tbody>
</table>
</dd></pre>
但是当我用浏览器打开 XML 文件时,值属性中的换行符和空格会被一个空格替换。那么我怎样才能以与它们在 XML 中相同的方式获得它呢?