bash: get content between a pair of HTML tags -
i need html contents between pair of given tags using bash script. example, having html code below:
<html> <head> </head> <body> text <div> text2 <div> text3 </div> </div> </body> </html>
using bash command/script, given body tag, get:
text <div> text2 <div> text3 </div> </div>
thanks in advance.
plain text processing not html/xml parsing. hope give idea:
kent$ xmllint --xpath "//body" f.html <body> text <div> text2 <div> text3 </div> </div> </body>
Comments
Post a Comment