Summary
This chapter showed you how to use JavaScript to work with XML in the browser. You learned about the W3C XML DOM and worked through some of the key interfaces. The chapter covered the most important methods and properties of each interface. You also saw some of the MSXML-specific methods and properties.
Within the chapter, I used the xDOM wrapper to generate cross-browser JavaScript capable of working with both IE 6 and Mozilla. I used the wrapper in a real-life example to load contacts into a web page. The application used XML, XSLT, and JavaScript to include dynamic content without the need for refreshing the interface. I also extended the example to see how it might work with large amounts of XML content.
As you saw, Mozilla and IE don’t offer universal support for XML and XSLT. Opera 8.5 has no XSLT support, although this is likely to change with the release of Opera 9. The use of a DOM wrapper allows you to create a cross-browser application that takes advantage of client-side XML and XSLT. In the next chapter, I’ll extend this concept further and look at the Ajax approach to working with XML in the browser.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2006 Sas Jacobs
About this chapter
Cite this chapter
(2006). Scripting in the Browser. In: Beginning XML with DOM and Ajax. Apress. https://doi.org/10.1007/978-1-4302-0177-9_8
Download citation
DOI: https://doi.org/10.1007/978-1-4302-0177-9_8
Publisher Name: Apress
Print ISBN: 978-1-59059-676-0
Online ISBN: 978-1-4302-0177-9
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books