Hi people,
I'm using a XML file in a datagrid... when I save it, I also would like to add a reference to a STYLE SHEET:
But the instruction "writeXML" delete all the contents of the file... in other words, it saves correctly all the data, but it doesn't save the string --> <?xml-stylesheet type="text/xsl" href="myFile.xsl"?>
How can I avoid this problem?
Thanks in advance!
I'm using a XML file in a datagrid... when I save it, I also would like to add a reference to a STYLE SHEET:
Code:
xmlWri := XmlTextWriter.Create('myFile.xml',Encoding.UTF8);
xmlWri.WriteString('<?xml-stylesheet type="text/xsl" href="myFile.xsl"?>');
xmlWri.Close;
ds.writeXML('myFile.xml',XmlWriteMode.IgnoreSchema);
MessageBox.Show('Data saved','Save',MessageBoxButtons.OK);
But the instruction "writeXML" delete all the contents of the file... in other words, it saves correctly all the data, but it doesn't save the string --> <?xml-stylesheet type="text/xsl" href="myFile.xsl"?>
How can I avoid this problem?
Thanks in advance!