move HTML elements inside files (batch/cli)

BillC

New Member
Im looking for a tool that allows me to easy manipulate elements in a set of HTML files through a CLI. Lets say if have the following html:\[code\]<html> <body> <article> <header/> <h1>xyz</h1> <p> para 1 </p> <p> para 2 </p> </article> </body></html>\[/code\]I like to do things like:
  • remove all /html/body/article/h1 elements
  • move /html/body/article/p[2] before /html/body/article/p[1]
  • add /html/body/article My footer
Is there any good tool to do this (preferable a TextMate of SublimeText plugin)? Or i'm i stuck with (creative) find and replace functions?
 
Back
Top