473,408 Members | 2,027 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

XML file created using XmlTextWriter

I created xml file using XmlTextWriter. When I opened the xml file using
binary editor, the first 3 bytes of the xml file consist of EF, BB, BF
respectively. Is there any way I can generate the XML without the mentioned
3 bytes (EF, BB, BF) ? Thanks in advance.
Mar 28 '06 #1
2 1971
That's a UTF8 byte order mark. Try this: Choose an appropriate constructor
for your XmlTextWriter or TextWriter-derived class (or whatever you are
using) taking an Encoding class parameter. Pass a new instance of
UTF8Encoding using the constructor with parameter to not set the byte order
mark (i.e. new UTF8Encoding(false)).

"quest" <an********@microsoft.com> wrote in message
news:Ow**************@TK2MSFTNGP09.phx.gbl...
I created xml file using XmlTextWriter. When I opened the xml file using
binary editor, the first 3 bytes of the xml file consist of EF, BB, BF
respectively. Is there any way I can generate the XML without the
mentioned
3 bytes (EF, BB, BF) ? Thanks in advance.

Mar 28 '06 #2
Hi,

What Encoding are you using?

use ASCII for example and see what you get
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"quest" <an********@microsoft.com> wrote in message
news:Ow**************@TK2MSFTNGP09.phx.gbl...
I created xml file using XmlTextWriter. When I opened the xml file using
binary editor, the first 3 bytes of the xml file consist of EF, BB, BF
respectively. Is there any way I can generate the XML without the
mentioned
3 bytes (EF, BB, BF) ? Thanks in advance.

Mar 28 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: reddy | last post by:
I am trying to insert a node into an XMLFile. using XMLTextwriter. My Question is Is it possible to do without using XMLDocument. Because its loading all the the file into memory. I just want to...
7
by: Leszek | last post by:
Hello, I have an XmlReader object containg some Xml code. I would like to export this document from the reader to an Xml file. How to do this? Thanks for any hints, Leszek Taratuta
6
by: Nad | last post by:
Hello, I need some help with this: I am trying to update some data using XmlTextWriter. I instantiate first and then do some validation and then copy data into the dataset. Finally I commit...
8
by: yinjennytam | last post by:
Hi all, I'm new to .NET and XML and I have a question. Given an XML file, I want to navigate its content and look for one or two particular elements to get their values. At this point, it...
11
by: Dica | last post by:
i'm getting an error about 'the process cannot access the file becaise it is being used by another process.' write after i've created a new file and try to open it for writing with xmlTextWriter....
1
by: Lloyd Dupont | last post by:
I'm using a newsgroup/blog/mailing list/forums all in one provider. After some negociation they would let me display the web interface of my newsgroup with a special template. This special...
3
by: darrel | last post by:
In our CMS, every time a page is updated, we spit out a new XML file. This file is written via a function that queries the Database using a recursive function, grabs the data, and writes out a...
2
by: dotnetnoob | last post by:
i'm working on a windows application that will edit and create xml files from another application. the original file is 83k, the one created by my vb.net program is 153k but all i add is a new...
3
by: C# to XML | last post by:
Hi Friends, I am new to csharp , I am using the following code to write into xml file : Just go through the code : fp = File.OpenText(Server.MapPath(".\\upload\\") + "test.txt"); string...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.