Using XMLWriter to create a custom header in C#



I'm fairly new to XML and very new to using the XMLWriter object. I've been successful in using it to write a "Well Formed" XML file, but after many failed attempts to create the needed header, below, I've decided to come here for some insight.



<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE IDMS-XML SYSTEM "http://ift.tt/1lSk1AY">
<IDMS-XML>
....


Here's the beginning of my code (very standard):



using (XmlWriter xmlWriter = XmlWriter.Create("SendXML.xml"))
{
xmlWriter.WriteStartDocument();
....


I've tried using things like xmlWriter.WriteString() to force it in, but that has been unsuccessful for me. Thanks for any and all insight.


No comments:

Post a Comment