我有一个看起来像这样的 xml 文件:
<TestRun>
<FailedTests>
<FailedTest id="19">
<Name>Test</Name>
<FailureType>Assertion</FailureType>
<Location>
<File>Sets.cpp</File>
</Location>
<Details>
<Detail id="1">Exception caught returning cmd response </Detail>
<Detail id="2">unresolvable error code</Detail>
</Details>
</FailedTest>
</FailedTests>
</TestRun>
我想获取 TestRun/FailedTests/FailedTest/Details 的子节点的值,我该怎么做?我试过了,但它不起作用:
<TD>
<xsl:for-each select="Details/Detail">
<br></br><br></br>
<xsl:value-of select="(Detail)"/>
</xsl:for-each>
</TD>
</TR>