Wrox Programmer Forums
|
BOOK: Beginning XML 3rd Edition
This is the forum to discuss the Wrox book Beginning XML, 3rd Edition by David Hunter, Andrew Watt, Jeff Rafter, Jon Duckett, Danny Ayers, Nicholas Chase, Joe Fawcett, Tom Gaven, Bill Patterson; ISBN: 9780764570773
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning XML 3rd Edition section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 18th, 2007, 04:43 PM
Authorized User
 
Join Date: Nov 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default ch11 msxml3 code prob

when I search for msxml3.dll in the files and folders, the search results show that I have msxml3.dll installed on the machine.
  but when I type this code in notepad I get an error message(the catch part of the code is displayed)
1. can anybody tell me why
2. and on this line
var objXMLDOM = new ActiveXObject ( "Msxml2.DOMDocument.3.0" ) ;
why do we have a Msxml2, what is the 2 for
  Here is the code:
<html>
  <head>
    <title>Test MSXML Install</title>
  <head>
  <body>
  <script language="JScript" type="text/javascript">
    try {
     var strXML = "<?xml version='1.0' ?><AnyElement>Some text</AnyElement>"
     var objXMLDOM = new ActiveXObject ( "Msxml2.DOMDocument.3.0" ) ;
     objXMLDOM.loadXML(strXML) ;

    //If no exception is raised MSXML 3 is installed.
    document.write("MSXML 3 is installed on your machine.") ;
          }

     // If there is an exception it could be a coding error but
     // it is likely that MSXML 3 is not installed.
     catch (e)
        {
          document.write("MSXML 3 is NOT installed on your machine.");
        }
   </script>
  </body>
</html>
 
Old May 19th, 2007, 02:38 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Assuming you are using IE then it's probably permissions. You need to alert(e.message), instead of writing a generic message, when it fails to see what the problem is. If it's "Couldn't create object" or similar and you're sure that it's installed correctly then add the site to "Trusted Sites" where the "Script ActiveX controls marked safe for scripting" option in the security settings is allowed or change the permission for the relevant zone in which the page is running.

--

Joe (Microsoft MVP - XML)





Similar Threads
Thread Thread Starter Forum Replies Last Post
"msxml3.dll error '80072ee7' kamn98 XML 5 June 21st, 2013 08:13 PM
msxml3.dll error '800c0008' a.verta Classic ASP XML 3 June 5th, 2008 10:27 AM
msxml3.dll error '800c0014' prakharbirla XML 0 March 24th, 2007 09:35 PM
code in CH11 not work in FireFox din BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0 2 January 18th, 2006 09:21 PM
Errata,Code,Ch11,ListboxAddExample.htm din BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0 1 January 17th, 2006 10:28 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.