Im writing stuff to an XML file using VB .net´s XmlTextWriter
The code to start the xmlwriter is:
Dim XMLobj As Xml.XmlTextWriter
Dim enc As System.Text.Encoding
enc = System.Text.Encoding.GetEncoding("ISO-8859-1")
XMLobj = New Xml.XmlTextWriter("C:\filename.xml", enc)
Is it possible to add param="on" to the first line of the XML file? So that it will look like:
<?xml version="1.0" encoding="ISO-8859-1" param="on"?>
The next question might be a stupid one :) but I just can't figure it out. I try to add a doctype to the XML file like:
<!DOCTYPE Test SYSTEM "test/my.dtd">
However when I try to set this up I get some errors.
XMLobj.WriteDocType("Test", null, "test/my.dtd", null)
The error I get is:
'null' is not declared. 'Null' constant is no longer supported; use 'System.DBNull' instead.
However when I try to replace null with System.DBNull I get the error:
'DBNull' is a type in 'System' and cannot be used as an expression.
The result of the doctype def should be like:
<!DOCTYPE Test SYSTEM "test/my.dtd">
Thanks in advance for your help!