0
Ich habe eine HTML-Datei wie folgt aus:Parse HTML mit XSLT
<html lang="en,us">
<head>
<title>Welcome to the Oracle</title>
</head>
<body>
<table width="100%" cellspacing="5" cellpadding="5" border="0">
<tr>
<td>
<h2>Welcome to the Oracle</h2>
<p>The following processes</p>
<ol>
<li>Process1</li>
<li>Process2</li>
<li>Process3</li>
</ol>
</td>
</tr>
</table>
</body>
</html>
Wenn ich diese Xslt gelten:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<xsl:for-each select="/html/body/table/tr/td/ol/li">
<xsl:value-of select="li"/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
ich nur nichts bekommen werde.
Wenn ich das versuchen:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<xsl:for-each select="/html/body/table/tr/td/ol/li">
<xsl:value-of select="/html/body/table/tr/td/ol/li"/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Dann ist diese bekommen:
Process1 Process1 Process1
Wie kann ich das bekommen?
Process1 Process2 Process3
Danke Martin. Genau das habe ich gesucht. – user2351802