Chapter 10. Understanding Java

Chapter 7, "Handling XML Documents with JavaScript," and Chapter 8, "XML and Data Binding," describe how to work with XML and JavaScript in Internet Explorer. However, JavaScript is a relatively lightweight language, and most serious XML programming doesn't take place in browsers such as Internet Explorer. Today, the most common way of handling XML in code is to use Java. Working with XML by using Java has become a central XML topic, and no XML book can ignore this connection.

Java should not be confused with JavaScript; despite their names and similar syntax, they are not truly related. Java is a creation of Sun Microsystems and JavaScript of Netscape. Java is far deeper and far more extensive than JavaScript.

On the other hand, now that we have used JavaScript, we've got a good leg up on Java because much of the basic syntax is similar (because both are based on the C++ model, not because JavaScript and Java are directly related). In the next two chapters, we'll see how to work with the most popular XML package written for Java—the XML for Java package from IBM's AlphaWorks.

In this chapter, we'll come up to speed with Java, building on what we already know of JavaScript. We'll get the skills that we need for the next two chapters in this chapter, including creating Java classes and windowed applications.

In general, creating serious applications with Java is more involved than working with JavaScript because Java is so much more extensive. As you can imagine, there's way more Java than we can cover in one chapter, so if you want to learn more, pick up a good book on the subject. Try Special Edition Java 2 Platform by Joseph Weber, published by Que, or Sams Teach Yourself Java 2 in 24 Hours, 2nd Edition by Roger Candenhead, published by Sams. On the other hand, this chapter introduces all the Java coding skills we'll use in the next two chapters. If you're already comfortable with Java, feel free to skip to the next chapter, where I work with the XML DOM in Java (not JavaScript, as in Chapter 7).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.213.214