... to Create an XML Document Sometimes I need to take data that is in my database and write it out to an XML document. I heard that XMLWriter is a good way to do this. What does XMLWriter do, and ... the btnCreateXMLFile button. The first task is to declare an instance of the XMLTextWriter. Then the XMLTextWriter creates and opens the file c:\Text.xml. Next, the XML document is created ... bytes as base64 and as binhex, and write out the resulting text. • Report the current namespace prefix, xml:lang, or xml:space scope. • Write valid names, qualified names, and name tokens....