create xml , encoding in uppercase ?

frankd

New member
Joined
Mar 12, 2010
Messages
3
Programming Experience
Beginner
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
 
This gets me the encoding declaration in upper case.

VB.NET:
        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")
 
Back
Top