An instance of the System.Xml.XmlWriter class is passed to the WriteXml function as an argument named xmlTarget.
public void WriteXml(Dictionary<string, string> parameters, XmlWriter xmlTarget)
{ .. }
You can use the functions exposed on the XmlWriter class or use other System.Xml classes like XmlDocument to build you XML.
The System.Xml.XmlDocument class contains a WriteTo() function that write the XML of the XmlDocument to an XmlWriter.
The following code snippet will load a XML document from the local file system and save it to the XmlWriter xmlTarget:
XmlDocument doc = new XmlDocument();
doc.Load(HttpContext.Current.Server.MapPath("/App_Data/SomeFile.xml"));
doc.WriteTo(xmlTarget);
The code leading up to the WriteTo() call is of course entirely up to you.
If you use the XmlWriter class to incrementally build the XML document please note the following:
Please consult MSDN or other sources for samples and a full documentation on the XmlWriter class.