How do I get xmllint
to output to a file?
thufir@dur:~/xmllint$
thufir@dur:~/xmllint$ xmllint --html http://www.skynet.be/nieuws-sport/weer/mijn-weer?cityId=6450 --xpath '//div[@class = "tides"]' - 2>/dev/null
<div class="tides">
<div class="weather-sprite icon st_nl" title="Marées Oostende"></div>
<p>Hoogtij: <strong>10:28</strong> <strong>23:11</strong></p>
<p>Laagtij: <strong>04:44</strong> <strong>17:13</strong></p>
<div class="weather-sprite icon anv_nl clearFlt" title="Marées Anvers"></div>
<p>Hoogtij: <strong>00:41</strong> <strong>13:06</strong></p>
<p>Laagtij: <strong>07:11</strong> <strong>07:11</strong></p>
</div><div class="tides">
<div class="weather-sprite icon st_nl" title="Marées Oostende"></div>
<p>Hoogtij: <strong>11:31</strong> <strong></strong></p>
<p>Laagtij: <strong>05:48</strong> <strong>18:10</strong></p>
<div class="weather-sprite icon anv_nl clearFlt" title="Marées Anvers"></div>
<p>Hoogtij: <strong>01:42</strong> <strong>14:02</strong></p>
<p>Laagtij: <strong>08:20</strong> <strong>08:20</strong></p>
</div>
^C
thufir@dur:~/xmllint$
As it hangs, it has to be killed. The fine manual:
--output FILE Define a file path where xmllint will save the result of parsing. Usually the programs build a tree and save it on stdout, with this option the result XML instance will be saved onto a file.
but can't get that working. I don't need any output to the console at all, only interested in the file creation. This is to tidy up the html
for processing by saxon
.