Sample Header Ad - 728x90

how to output html to a file with xmllint?

3 votes
1 answer
4938 views
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

Hoogtij: 10:28  23:11

Laagtij: 04:44  17:13

Hoogtij: 00:41  13:06

Laagtij: 07:11  07:11

Hoogtij: 11:31  

Laagtij: 05:48  18:10

Hoogtij: 01:42  14:02

Laagtij: 08:20  08:20

^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.*
Asked by Thufir (1970 rep)
Jan 2, 2019, 11:01 PM
Last activity: Jul 5, 2021, 07:55 PM