lol_html 1.2.1

Streaming HTML rewriter/parser with CSS selector-based API
Documentation
<html><head>
  <title>Universal selector without declared namespace</title>
  <style type="text/css">@namespace a url(http://www.example.org/a);
@namespace b url(http://www.example.org/b);
div.green * { background-color : red }
div.test * { display : block ; margin-bottom : 1em }
div.test |* { background-color : lime }</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=" namespace">
 </head>
 <body>
<div class="test">
 <!--[ELEMENT('div.test *')]--><p><!--[TEXT('div.test *')]-->This line should be unstyled.<!--[/TEXT('div.test *')]--></p><!--[/ELEMENT('div.test *')]-->
 <!--[ELEMENT('div.test *')]--><elementa xmlns="http://www.example.org/a"><!--[TEXT('div.test *')]-->This line should be unstyled.<!--[/TEXT('div.test *')]--></elementa><!--[/ELEMENT('div.test *')]-->
 <!--[ELEMENT('div.test *')]--><elementb xmlns="http://www.example.org/b"><!--[TEXT('div.test *')]-->This line should be unstyled.<!--[/TEXT('div.test *')]--></elementb><!--[/ELEMENT('div.test *')]-->
 <!--[ELEMENT('div.test *')]--><div class="green"><!--[TEXT('div.test *')]-->
  <!--[/TEXT('div.test *')]--><!--[ELEMENT('div.test *')]--><p xmlns=""><!--[TEXT('div.test *')]-->This line should have a green background<!--[/TEXT('div.test *')]--></p><!--[/ELEMENT('div.test *')]--><!--[TEXT('div.test *')]-->
  <!--[/TEXT('div.test *')]--><!--[ELEMENT('div.test *')]--><elementa xmlns=""><!--[TEXT('div.test *')]-->This line should have a green background<!--[/TEXT('div.test *')]--></elementa><!--[/ELEMENT('div.test *')]--><!--[TEXT('div.test *')]-->
  <!--[/TEXT('div.test *')]--><!--[ELEMENT('div.test *')]--><elementb xmlns=""><!--[TEXT('div.test *')]-->This line should have a green background<!--[/TEXT('div.test *')]--></elementb><!--[/ELEMENT('div.test *')]--><!--[TEXT('div.test *')]-->
 <!--[/TEXT('div.test *')]--></div><!--[/ELEMENT('div.test *')]-->
</div>

</body></html>