权力的游戏玫瑰战争:asp如何检验xml的有效性

来源:百度文库 编辑:高校问答 时间:2024/05/11 14:24:57

function CheckXML(XmlPath)
CheckXML=true
on error resume next
dim strSourceFile,strError
strSourceFile = Server.MapPath(XmlPath)
Set XMLMorntekDocument = Server.CreateObject("Microsoft.XMLDOM")
XMLMorntekDocument.async = false
XMLMorntekDocument.load(strSourceFile)
errorcode=XMLMorntekDocument.parseerror.errorcode
If Err Then
CheckXML=false
Err.clear
end if
end function

那个要用Schema来做的