G
Guest
I have a data structure that I am writing to an XML file using XmlSerializer.
XmlSerializer xSer = new XmlSerializer(typeof(MyData));
StreamWriter sw = new StreamWriter("SomeData.xml");
xSer.Serialize(sw, theData);
sw.Close();
I need to add a style reference within the file that looks like this:
<?xml-stylesheet type="text/xsl" href="MyStyle.xsl"?>
Can someone show me how this is done? Can it be done with the XmlSerializer
class? I can't seem to find the method.
XmlSerializer xSer = new XmlSerializer(typeof(MyData));
StreamWriter sw = new StreamWriter("SomeData.xml");
xSer.Serialize(sw, theData);
sw.Close();
I need to add a style reference within the file that looks like this:
<?xml-stylesheet type="text/xsl" href="MyStyle.xsl"?>
Can someone show me how this is done? Can it be done with the XmlSerializer
class? I can't seem to find the method.