title: libxml2 writer differences
body: <p>The bulk of the examples I can find for <code>libxml2</code> are all about loading/parsing XML files. But I'm only interested in writing them; the code will never have to parse any files. There is an example <a href="http://xmlsoft.org/examples/testWriter.c" rel="nofollow">using different writers</a>, where it shows how to use the <code>file</code>, <code>memory</code>, <code>DOM</code> and <code>tree</code> models. </p>
  
  <p>Looking through the code, I don't see any significant differences between them when it comes to writing. How does one decide which is better to use? (In other words, in what cases is one better than the others?) </p>