Maybe this will help you out:
Making the Encoding property upper case during XmlSerialization
|
|
Hi everybody,
we are using XmlTextWriter to create an xml-file
everything works fine,
The encoding of the xml-file is UTF-8
we even put the following :
encoding = System.Text.Encoding.GetEncoding("UTF-8")
proXmlWriter = New XmlTextWriter(pathResultaat, encoding)
but in our result xml-file, it says
<?xml version="1.0" encoding="utf-8"?>
and it should be
<?xml version="1.0" encoding="UTF-8"?>
in upper case !
what can we do to resolve this problem ?
thx in advance
Maybe this will help you out:
Making the Encoding property upper case during XmlSerialization
Hi Matt,
thx for the link, but i had found that one before, but it didn't solve the problem for me![]()
This gets me the encoding declaration in upper case.
Code:Dim doc As New XmlDocument Dim decl As XmlDeclaration = doc.CreateXmlDeclaration("1.0", "UTF-8", Nothing) doc.AppendChild(decl) Dim root As XmlElement = doc.CreateElement("root") doc.AppendChild(root) doc.Save("C:\Temp\xmlDecl.xml")
Thanks a lot !
I have it working now !
kind regards
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks