如何使用MSXML在XSL Transform之后或之前指定或更改XML编码 [英] How to specify or change XML encoding after or before XSL Transform using MSXML
问题描述
大家好!
我正在使用MSXML导入" MSXML.dll"转换xml文件;默认情况下,MSXML使用以下命令指定编码:
<?xml version = \" 1.0 \" encoding = \" UTF-16 \"?">,但我需要使用ISO-8859-1。我实际上是使用createProcessingInstruction和insertBefore做的,但最后在文件中保留两个enconding标签...
我想知道是否有一种方法在xsl转换之前指定编码,或者MSXML找到的位置使用的编码...
我在VStudio 2005下使用c ++
Thanx很多。
Hi to everyone!
I'm using MSXML importing "MSXML.dll" to transform a xml file; by default, MSXML specify encoding using:
<?xml version=\"1.0\" encoding=\"UTF-16\"?">, but i need to use ISO-8859-1. I'm actually doing it using createProcessingInstruction and insertBefore, but finally in the file stay both enconding tags...
I wanna know if there is a way to specify the encoding before the xsl transformation, or where MSXML finds the encoding to use...
I'm using c++ under VStudio 2005
Thanx a lot.
推荐答案
hello
我也收到这个错误,所以我使用不同的方法来完成这个任务(对于Jerry.Wang来说是基本的想法)
假设MSXML2 :: IXMLDOMDocument2Ptr m_pDoc;
尝试使用
hello
i'm receive this error too, so i use diffrent method for this task (thx to Jerry.Wang for base idea)
assume MSXML2::IXMLDOMDocument2Ptr m_pDoc;
try using
这篇关于如何使用MSXML在XSL Transform之后或之前指定或更改XML编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!