Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML DOM - Is it installed

COM and Automation

XML DOM - Is it installed

by  jimoo  Posted    (Edited  )
#IF
If you plan on using the XML Document Object Model (DOM) for HTTP transport or creating XML documents, it must be installed. The following code checks to see if it is installed on the user's pc first. If not, it provides a nice message instead of an error.

To test it, you can copy all this code into a prg and run it.
#ENDIF

loDomExist = CREATEOBJECT("MSXML2.DOMDocument")
IF NOT TYPE("loDomExist") = "O"
lcMsg = "This application requires Microsoft's XML Document Object Module." +;
" It is not installed on this PC. The easiest way to install it is " +;
"to install Interent Explorer (IE) 6.0, Service Pack 1 or greater..." +;
CHR(13)+ CHR(10)+ CHR(13)+ CHR(10) + "You can download and install the latest " +;
"version of Internet Explorer at www.microsoft.com/downloads";
MESSAGEBOX(lcMsg)
RETURN
ELSE
MESSAGEBOX("XMLDOM is installed.")
ENDIF
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top