我这段代码有什么问题啊?
XML文件没有问题,strEnvFile文件也没有问题,我修改了那个节点,可是老是写不上我修改的内容,为什么啊
set xmlDoc=Server.CreateObject("Microsoft.XMLDOM")
xmlDoc.async = false
xmlDoc.validateOnParse =false
xmlDoc.resolveExternals=false
xmlDoc.load(strEnvFile)
if xmlDoc.parseerror.errorcode<>0 then
else
set xmlRootNode=xmlDoc.getElementsByTagName("services")
if xmlRootNode.Length<1 then
else
set xmlNode=xmlRootNode(0).selectSingleNode("hostname")
if xmlNode.Length=0 then
xmlNode.text="hello world"
xmlDoc.save(szEnvFile)
end if
set xmlNode=nothing
end if
set xmlRootNode=nothing
end if
set xmlDoc=nothing