246 CHAPTER 8 SCRIPTING IN THE BROWSER (Hp web site)
246 CHAPTER 8 SCRIPTING IN THE BROWSER xDOM Caveats There are some important points to note when using xDOM. The first is that the wrapper cannot check the version of XSLT supported by the DOM Document you create. If you need to support much older browsers, you may need to load a different XSLT document based on the version of MSXML installed. You can do this by looking at the value of the strMSXMLProgID variable initialized when the xDOM library loads. The xDOM library doesn t allow the free threaded version of the MSXML DOM Document to be created. The free threaded version is most important when running code on the server side. The object uses a different threading model to interact with the operating system, and this is important when there are multiple requests for the DOMDocument at the same time, as in server- side applications. The xDOM wrapper doesn t provide a complete solution to the differences between MSXML and Mozilla. You still need to test your application rigorously in all browser versions that you re targeting. I checked xDOM with IE 6.0 and Mozilla 1.0. So far, you ve seen some of the theory behind scripting the DOM. Now it s time to look at how to apply this code in some examples. Using JavaScript with the DOM Let s use JavaScript to work with the xDOM library in a test web page. You can find this page, test.htm, with your resources. It contains code that shows you how to perform many simple XML tasks using the xDOM library. Figure 8-3 shows test.htmdisplayed in Firefox 1.5. The test page contains a series of
Please visit our professional web hosting services to find out about cheap and reliable webhost service that will surely answer all your demands.