Chapter 6. Understanding JavaScript

This book is written to require only knowledge of HTML before starting because we're covering XML from scratchand that means many readers don't come to this book with a programming background. However, XML is a natural for programming because you can tell a browser how to handle your documents if you do use programming. Fortunately, we won't have to learn a lot about programming here; all we'll need to understand are the fundamentals of JavaScript to work with XML in a browser. If you already know JavaScript, feel free to skip this chapter; if not, this chapter is here so you don't have to run out and buy a book on JavaScript before proceeding with the work we'll be doing in the next few chapters.

JavaScript Coverage

If you already know JavaScript, you might want to go on to Chapter 7, "Handling XML Documents with JavaScript," now. We're now on the second edition of this book, and I've had so many emails from readers saying that the chapter on JavaScript and the upcoming chapter on Java were so useful to them that I'm leaving these chapters in the book.

These days, the browser that lets you interact with XML documents in the most powerful and general way is Microsoft Internet Explorer. Whatever you think of Microsoft, there's no denying that it's making a serious attempt at supporting XML. You can write code in Internet Explorer to work with XML documents in either VBScript (Microsoft's proprietary scripting language based on its Visual Basic language) or JavaScript. Other browsers are going to follow suit. For example, Netscape Navigator 6 already offers some XML support, and although it will allow you to access XML documents from code in the future, Netscape hasn't said much publicly on the point yet. To support the largest number of browsers, I'll use JavaScript to access XML in browsers in this book (and we'll also use Java itself later in the book). This chapter will provide the foundation for that work.



Real World XML
Real World XML (2nd Edition)
ISBN: 0735712867
EAN: 2147483647
Year: 2005
Pages: 440
Authors: Steve Holzner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net