title: Java convert a DOM object into paragraphs
body: <p>Is there a similar function to the python function <code>lmxl.sax.saxify</code> [1] in java to generate SAX events from a DOM and fire them against a SAX ContentHandler. 
  The main intention is to convert a DOM object into a list of paragraphs.
  given this html snippet</p>
  
  <pre><code>&lt;p&gt; Here is a text! 
  &lt;ul&gt;&lt;li&gt;list1&lt;/li&gt;&lt;li&gt;list2&lt;/li&gt;&lt;/ul&gt;
  &lt;/p&gt;
  </code></pre>
  
  <p>the output that I want is:</p>
  
  <ul>
  <li>1st paragraph: Here is a text!</li>
  <li>2nd paragraph: list1   </li>
  <li>3rd paragraph: list2</li>
  </ul>
  
  <p>[1] <a href="http://lxml.de/api/lxml.sax-module.html#saxify" rel="nofollow">http://lxml.de/api/lxml.sax-module.html#saxify</a></p>