Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XslCompiledTransform for transformatin via xsl encoding prob

Status
Not open for further replies.

ozane

Technical User
Feb 3, 2005
57
TR
Hi,
i am trying to transform a xml using xsl in asp.net page. my code like that.
Code:
Dim bb = xmlhttp.responseXML.xml
            Dim dok As New System.Xml.XmlDataDocument
            dok.LoadXml(bb)
            Dim trans As New System.Xml.Xsl.XslCompiledTransform
            trans.Load(Server.MapPath("Trans.xsl"))
            Dim rt As New System.IO.StringWriter
            trans.Transform(dok, Nothing, rt)
            TextBox2.Text = rt.ToString
it is working well however encoding of result XML is UTF-16. what i need is UTF-8
how can i set that parameter for UTF-8?

Thanks
 
Is the encoding set to UTF-8 in the actual xml file?


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
it is starting with
<?xml version="1.0"?>. no encoding in it.

did you mean that?

Thanks
 
Yes, I did mean that. Is there a reason it isn't set or could you simply change it so that it is?


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
that is coming from remote server.
i am working on a client. therefore i cant change it on the server.
is that related to stringwriter or XML?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top