본문 바로가기

development/windows

HTML로 MSXML 버젼확인

<HTML>
    <HEAD>
        <meta http-equiv=Content-type content=text/html; charset=euc-kr>
        <SCRIPT language=VBscript>
            sub GetMSXMLVer
                DIM msg

                msg = "이 컴퓨터에는"
                msg = msg &  (Chr(13)&Chr(10))
                xml = "<"+"?xml version='1.0'?"+"><root>SnIFfer</root>"
                ON ERROR RESUME NEXT
               
                SET  dom =  CreateObject("microsoft.XMLDOM")
                dom.async = false
                IF Err =  0 THEN
                    IF(dom.loadXML(xml)) THEN
                        msg = msg + " - msxml"
                        msg = msg &  (Chr(13)&Chr(10))
                    END IF
                    SET dom = nothing
                END IF
               
                ON ERROR RESUME NEXT
                SET dom = CreateObject("Msxml2.DomDocument")
                dom.async = false
                IF Err =  0 THEN
                    IF(dom.loadXML(xml)) THEN
                        msg = msg + " - Msxml2.DomDocument "
                        msg = msg &  (Chr(13)&Chr(10))
                    END IF
                    SET dom = nothing
                END IF
               
                ON ERROR RESUME NEXT
                SET dom = CreateObject("Msxml2.DomDocument.2.6")
                dom.async = false
                IF Err =  0 THEN
                    if(dom.loadXML(xml)) THEN
                        msg = msg + " - Msxml2.DomDocument2.6 "
                        msg = msg &  (Chr(13)&Chr(10))
                    END IF
                    SET dom = nothing
                END IF
               
                ON ERROR RESUME NEXT
                SET dom = CreateObject("Msxml2.DomDocument.3.0")
                dom.async = false
                IF Err =  0 THEN
                    IF(dom.loadXML(xml)) THEN
                        msg = msg + " - Msxml2.DomDocument3.0 "
                        msg = msg &  (Chr(13)&Chr(10))
                    END IF
                    SET dom = nothing
                END IF
               
                ON ERROR RESUME NEXT
                SET dom = CreateObject("Msxml2.DomDocument.4.0")
                dom.async = false
                IF Err =  0 THEN
                    IF(dom.loadXML(xml)) THEN
                        msg = msg + " - Msxml2.DomDocument4.0 "
                        msg = msg &  (Chr(13)&Chr(10))
                    END IF
                    SET dom = nothing
                END IF
               
                msgbox msg & "   이 설치되어 있습니다.",,"내 컴퓨터에 설치된 파서목록"
            END Sub
       
        </SCRIPT>
   
    </HEAD>
    <BODY>
        <INPUT onclick=GetMSXMLVer type=button value="설치된 MSXML 버전 확인하기">
    </BODY>
</HTML>