UNIX tool to dump a selection of HTML?
Posted
by jldugger
on Server Fault
See other posts from Server Fault
or by jldugger
Published on 2010-05-05T23:04:07Z
Indexed on
2010/05/05
23:08 UTC
Read the original article
Hit count: 202
I'm looking to monitor changes on websites and my current approach is being defeated by a rotating top banner. Is there a UNIX tool that takes a selection parameter (id attribute or XPath), reads HTML from stdin and prints to stdout the subtree based on the selection?
For example, given an html document I want to filter out everything but the subtree of the element with id="content"
. Basically, I'm looking for the simplest HTML/XML equivalent to grep.
© Server Fault or respective owner