title: Can I set attribute on a parent node after writing children with XmlWriter
body: <p>I am writing rows from a one-directional data reader to xml. Xml structure is like </p>
  
  <pre><code>&lt;rows Count="10"&gt;&lt;row/&gt;..&lt;row/&gt;&lt;/rows&gt;
  </code></pre>
  
  <p>I do not know the row count upfront. What is the best a way to write count attribute in this scenario? Currently I write all rows, load the string in XmlDocument and generate the attribute. It does work, but what if I had a lot of rows?</p>