title: extract classes/ids from html pages
body: <p>I need to create a css stylesheet for an existhng html page. Is there any easy way to extract all the classes and ids using a script... I am familiar with python, java, c, javascript and php. Is there any library for those languages? re sems a bit overkill for me. grateful for any help.</p>
  
  <p>cheers!</p>