title: Generate a Word document (docx) using data from an XML file / Convert XML to a Word document based on a template
body: <p>I have an XML file with the data that I need to be populated on a Word document.</p>
  
  <p>I need to find a way, to define a template which can be used as a base line to populate data from an XML file and create an output document.</p>
  
  <p>I believe there are two ways to do this.</p>
  
  <ol>
  <li>Create an XSLT file which will be the "template" and use this to generate Word documents using it in conjunction with the XML file.</li>
  <li>Use content controls in Word to create a template document and somehow map to an XML file.</li>
  </ol>
  
  <p>I just don't know the details on how to implement either way. Or not sure if there is another, easier way to accomplish this task.</p>
  
  <p>Could someone show an example of how this can be implemented. Just a simple example would be sufficient.</p>
  
  <p>I prefer C# for any coding. I am using Word 2016 but want it to be compatible from Word 2007 to Word 2016 and everything in between if possible since users will be using these versions. Thank you!</p>