title: What C/C++ library to use for HTML DOM building/changing?
body: <p>I am using perl module <code>HTML::DOM</code> (<a href="http://search.cpan.org/~sprout/HTML-DOM-0.044/lib/HTML/DOM.pm" rel="nofollow">link to CPAN</a>) for building HTML DOM tree from HTML code and then changing it using standard DOM's <code>removeAttribute</code>, <code>removeChild</code>, <code>innerHTML</code>, <code>createElement</code> and so on.</p>
  
  <p>But, I have found out it's really, really slow and eating too much memory (it's fully in perl, anyway). So, I thought that there will be some C/C++ library that does it faster and more efficiently (because it happens in every browser that have JavaScript support). </p>
  
  <p>So far, I have not found anything. Maybe I am searching wrong?</p>
  
  <p>edit: I will add. I would like it if it worked similarly to linked Perl module - by that, I really mean so I could use directly HTML's <code>innerHTML</code>, <code>className</code>, <code>idName</code>... Is it posible, or will I need to use general XML parser and then write these by myself?</p>
  
  <p>edit2: OK, the slowness of the Perl module was actually my fault entirely. However, since I already asked, the question still stands :)</p>