On Apr 28, 8:02 am, james_027 <cai.hai...@gmail.com> wrote:
> hi,
>
> Any idea how I can replace words in a html file? Meaning only the
> content will get replace while the html tags, javascript, & css are
> remain untouch.
>
> THanks,
> James

You might try cleaning the HTML with uTidy (http://
utidylib.berlios.de/) to make XHTML then using Beautiful Soup (http://
www.crummy.com/software/BeautifulSoup/documentation.html) to process
it.

If the number of files isn't that large and it's a one-time thing, you
might be just as well using search and replace on the directory and
previewing each replacement as you go....
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to