[Home] [By Thread] [By Date] [Recent Entries]
The following same changes the file test.xml:
<?xml version="1.0" encoding="UTF-8" ?>
<steven>©</steven>
and changes the encoding as follows:
<?xml version="1.0" encoding="ISO-8859-1"?>
<steven>©</steven>
The script is..
set xmlDoc = server.createobject("Msxml2.DOMDocument.3.0")
xmlDoc.async = false
xmlDoc.validateOnParse = true
xmlDoc.load(server.MapPath("test.xml"))
set pi = xmlDoc.createProcessingInstruction("xml", "version='1.0' encoding='ISO-8859-1'")
xmlDoc.replaceChild pi,xmlDoc.childNodes.item(0)
xmlDoc.save(server.MapPath("test.xml"))
Whether standard or not, it works.
Cheers,
Steven
Author, Pro XML2e
|

Cart



