lol_html 1.2.1

Streaming HTML rewriter/parser with CSS selector-based API
Documentation
<html><head>
  <title>Direct adjacent combinator</title>
  <style type="text/css">.green { background-color: lime; }
.white { background-color: transparent ! important; }
div.stub > p + p { background-color: red; }</style>
  <link rel="author" title="Daniel Glazman" href="http://glazman.org/">
  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch">
  <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"> <!-- bogus link to make sure it gets found -->
  <meta name="flags" content="">
 </head>
 <body>
 <div class="stub">
  <!--[ELEMENT('.green')]--><p class="green"><!--[TEXT('.green')]-->This paragraph should have a green background.<!--[/TEXT('.green')]--></p><!--[/ELEMENT('.green')]-->
  <p class="white">But this one should be unstyled.</p>
  <p class="white">And this one should also be unstyled.</p>
  <!--[ELEMENT('.green')]--><address class="green"><!--[TEXT('.green')]-->This address is only here to fill some space between two paragraphs and should have a green background.<!--[/TEXT('.green')]--></address><!--[/ELEMENT('.green')]-->
  <!--[ELEMENT('.green')]--><p class="green"><!--[TEXT('.green')]-->This paragraph should have a green background too.<!--[/TEXT('.green')]--></p><!--[/ELEMENT('.green')]-->
 </div>

</body></html>