Hi,
I am getting one problem with xml file after generation.
<?xml version="1.0" encoding="utf-8"?>
some junk characters are coming before <?xml.... tag like above.
its happening when i mentioned encoding attribute.
here below is my code to set the encoding type.
Dim xw As XmlTextWriter = Nothing
xw = New XmlTextWriter(filename, System.Text.Encoding.UTF8)
xw.Formatting = Formatting.Indented
xw.WriteStartDocument()
xw.WriteDocType("cXML", Nothing, "http://xml.cxml.org/schemas/cXML/1.2.020/InvoiceDetail.dtd", Nothing)
i need encoding attribute compulsary in <?xml ... tag.
how to avoid these junk characters???
Thanks in advance.
I am getting one problem with xml file after generation.
<?xml version="1.0" encoding="utf-8"?>
some junk characters are coming before <?xml.... tag like above.
its happening when i mentioned encoding attribute.
here below is my code to set the encoding type.
Dim xw As XmlTextWriter = Nothing
xw = New XmlTextWriter(filename, System.Text.Encoding.UTF8)
xw.Formatting = Formatting.Indented
xw.WriteStartDocument()
xw.WriteDocType("cXML", Nothing, "http://xml.cxml.org/schemas/cXML/1.2.020/InvoiceDetail.dtd", Nothing)
i need encoding attribute compulsary in <?xml ... tag.
how to avoid these junk characters???
Thanks in advance.