By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,330 Members | 1,135 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,330 IT Pros & Developers. It's quick & easy.

encoding="utf-8" ?

P: n/a
When I transform a dataset to a xml file by applying a
xslt file, why by default, a "encoding="utf-8" ?" is
added to the output file?How to get rid of it?
Thanks
Nov 12 '05 #1
Share this Question
Share on Google+
4 Replies

P: n/a
peter wrote:
When I transform a dataset to a xml file by applying a
xslt file, why by default, a "encoding="utf-8" ?" is
added to the output file?How to get rid of it?


Because UTF-8 is default output encoding. Try
omit-xml-declaration="yes" attribute on xsl:stylesheet element to get
rid of xml declaration.
--
Oleg Tkachenko
XML Insider
http://www.tkachenko.com/blog

Nov 12 '05 #2

P: n/a
I have tried.But it also got rid of of <?xml
version="1.0" ?>
-----Original Message-----
peter wrote:
When I transform a dataset to a xml file by applying a
xslt file, why by default, a "encoding="utf-8" ?" is
added to the output file?How to get rid of it?
Because UTF-8 is default output encoding. Try
omit-xml-declaration="yes" attribute on xsl:stylesheet

element to getrid of xml declaration.
--
Oleg Tkachenko
XML Insider
http://www.tkachenko.com/blog

.

Nov 12 '05 #3

P: n/a
Peter wrote:
I have tried.But it also got rid of of <?xml
version="1.0" ?>

And don't want to? You cannot get rid of just encoding declaration. Why
do you care? UTF-8 is default anyway.
--
Oleg Tkachenko
XML Insider
http://www.tkachenko.com/blog

Nov 12 '05 #4

P: n/a


peter wrote:
When I transform a dataset to a xml file by applying a
xslt file, why by default, a "encoding="utf-8" ?" is
added to the output file?How to get rid of it?


Why do you want to get rid of that? The XML declaration with the
encoding specified is part of the XML syntax so any XML parser should be
able to process your XML file without problems.
If you want a different encoding use
<xsl:output encoding="iso-8859-1" />
for instance.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Nov 12 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.