This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: encoding="iso-8859-1"
- To: <xsl-list at mulberrytech dot com>, <roland at dunn dot co dot uk>
- Subject: RE: encoding="iso-8859-1"
- From: "Stéphane Mamdy" <smamdy at agrifirst dot com>
- Date: Fri, 16 Jun 2000 09:15:42 +0200
- Reply-To: xsl-list at mulberrytech dot com
Hi,
I have the same problem.
To solve it, I build all like this...
Response.CharSet = "ISO-8859-1"
Response.ContentType = "text/xml"
Response.Write "<?xml version=""1.0"" encoding=""ISO-8859-1"" ?>"
xml.appendChild xml.createProcessingInstruction("xml:stylesheet",
"type=""text/xsl"" href=""xxx.xsl""" )
dim root
set root = xml.createElement("somenews")
xml.insertBefore root, nothing
set obj_news = xml.createElement("somenews")
root.insertBefore obj_news , nothing
set objet = xml.createElement("section")
set attribut = xml.createAttribute("ID")
attribut.Text = "1"
objet.Attributes.setNamedItem attribut
obj_news.insertBefore objet, nothing
set objet_t = xml.createElement("text")
objet_t.text = "Fred drank milk"
objet.insertBefore objet_t, nothing
Response.Write xml.xml
That's all...
With this, the content encoding is OK.
Stéphane Mamdy.
Hi,
I have a query. Suppose I write out the following XML as a little file.
<?xml version="1.0" encoding="iso-8859-1"?><somenews><section
id="1"><text>Fred drank milk</text></section></somenews>
If, I load this into the MXSML DOM in an ASP script as follows:
xmlObj.Load("tiny.xml") - I have no problems. The DOM can handle it, and I
can manipulate it.
If, however, I load this into the DOM like this:
xmlObj.LoadXML("<?xml version=""1.0""
encoding=""iso-8859-1""?><somenews><section id=""1""><text>Fred drank
milk</text></section></somenews>")
I get the following error code: "Switch from current encoding to specified
encoding not supported. errorcode : -1072896657"
Anyone know a way to work around this?
Please email me direct at roland@dunn.co.uk as well as to the mailing list.
Many thanks,
Roland.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list