Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / XML / October 2003

Tip: Looking for answers? Try searching our database.

Saving XML in Unicode (UTF-16)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Antonio Passado - 31 Oct 2003 15:29 GMT
Hi,

I need to read from and write to XML file, that is stored in Unicode. With
reading there are no problems, but Microsoft's Msxml2.DOMDocument.4.0 saves
data back to XML file in UTF-8 by default. I can add the string <?xml
version="1.0" encoding="UTF-16"?> and then parser saves it in Unicode, but
it adds this string to the file to. AND the problem is that an original file
doesn't contain such string and with this string at the beginning it is not
recognised as a valid file by target application. I've tried to delete this
string from file after saving it through Scripting.FileSystemObject but this
corrupts file and it is not a valid XML file after such deletion. Can
anybody tell me is there a possibility to save an XML file in Unicode w/o
this stupid <?xml version="1.0" encoding="UTF-16"?> string?

Thanks in advance
Oleg Tkachenko - 31 Oct 2003 16:26 GMT
> Can
> anybody tell me is there a possibility to save an XML file in Unicode w/o
> this stupid <?xml version="1.0" encoding="UTF-16"?> string?

So you want to save XML in UTF-16 but without XML declaration? That
hardly makes any sence, becuase resulting file would be non well-formed.
Signature

Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.