473,324 Members | 2,257 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,324 software developers and data experts.

how to get "version" and "encoding" using xmltextwriter

I am trying to use XmlTextWriter. I write the xml data fine, but the file
is missing the first line that shows the version and encoding:

<?xml version="1.0" encoding="utf-8"?>

Can the XmlTextWriter do this?? Thanks.

Amil
Nov 12 '05 #1
2 3021
Are you using WriteStartDocument?

--
This posting is provided "AS IS" with no warranties, and confers no rights.

"Amil Hanish" <am********@hotmail.com> wrote in message
news:ug**************@tk2msftngp13.phx.gbl...
I am trying to use XmlTextWriter. I write the xml data fine, but the file
is missing the first line that shows the version and encoding:

<?xml version="1.0" encoding="utf-8"?>

Can the XmlTextWriter do this?? Thanks.

Amil

Nov 12 '05 #2
That was it! Thanks.

Amil

"Dare Obasanjo [MSFT]" <da***@online.microsoft.com> wrote in message
news:40********@news.microsoft.com...
Are you using WriteStartDocument?

--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Amil Hanish" <am********@hotmail.com> wrote in message
news:ug**************@tk2msftngp13.phx.gbl...
I am trying to use XmlTextWriter. I write the xml data fine, but the file is missing the first line that shows the version and encoding:

<?xml version="1.0" encoding="utf-8"?>

Can the XmlTextWriter do this?? Thanks.

Amil


Nov 12 '05 #3

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

Similar topics

2
by: Gustaf Liljegren | last post by:
I'm using xml.sax.parseString to read an XML file. The XML file contains a few words in Russian, and is encoded in UTF-8 using C#. In the example below, MyParser() is my SAX ContentHandler class....
3
by: Mike Kennedy | last post by:
I have an XML Snippet <?xml version="1.0" encoding="UTF-8"?> and when I convert the entire xml file to a DOM and then generate a new file from the DOM, results in <?xml version="1.0"?>. Any...
4
by: Kent Tong | last post by:
Hi, Why is it required to specify the encoding pseudo attribute in a DTD? For example, it is OK to have: <?xml version="1.0" encoding="ISO-8859-1"?> <!ELEMENT ...> But it causes Xerces to...
6
by: | last post by:
Hi, I'm using .Net CF, and I'm trying to load an XML document that has a first line: <?xml version="1.0" encoding="ISO-8859-1"?> I'm loading this via XmlDocument.Load(). However, I get and...
3
by: Amy L. | last post by:
I am using the xml serializer to serialize the objects out of a collection into a file. The object that is being serialized is a class in my application. When I serialize my class it produces the...
1
by: Daniel | last post by:
how to parse <?xml version="1.0" encoding="UTF-8"?> with xpath? is it possible?
2
by: dazedandconfused | last post by:
Building a site for a client, loaded it up, it works fine in Firefox but presents the below message when loading into ie 6 or ie 5, fine in 7 I think, but the client can not even view it in 7. So...
2
by: ashwinij | last post by:
Hello The steps which i am doing in my program 1) I am having an xml file. 2) I am performing some updations in the file using XQueryUtil class from nux package. 3)After that i am...
3
by: jariwaladivyesh | last post by:
Hi frnds, i have simple XML doc <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href="test.xsl"?> <data> <name> Divyesh Jariala</name> </data>
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.