Note that there are some explanatory texts on larger screens.

plurals
  1. POCan I parse an HTML using XSLT?
    primarykey
    data
    text
    <p>I have to parse a big HTML file, and Im only interested in a small section (a table). So I thought about using an XSLT to simplify/transform the HTML in something simpler that I could then easily process.</p> <p>The problem Im having is that the is not finding my table. So I don't know if its even possible to parse HTML using a XSL stylesheet.</p> <p>By the way, the HTML file has this look (schematic, missing tags):</p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html id="ctl00_htmlDocumento" xmlns="http://www.w3.org/1999/xhtml" lang="es-ES" xml:lang="es-ES"&gt; &lt;div&gt; some content &lt;/div&gt; &lt;div class="NON_IMPORTANT"&gt;&lt;/div&gt; &lt;div class="IMPORTANT_FATHER&gt; &lt;div class="IMPORTANT"&gt; &lt;table&gt; HERE IS THE DATA IM LOOKING FOR &lt;/table&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p><strong>as per request, here is my xsl</strong></p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"&gt; &lt;xsl:template match="tbody"&gt; tbody found, lets process it &lt;xsl:for-each select="tr"&gt; new tf found, lets process it &lt;/xsl:for-each&gt; &lt;/xsl:template&gt; &lt;/xsl:stylesheet&gt; </code></pre> <p>The full HTML is quite big so I dont know how to present it here... I've tested for valid document on Oxygen, and it says its valid.</p> <p>Thanks in advance. Gonso</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload