Processing XML with Java: a Guide to SAX, DOM, JDOM, JAXP, and TrAX Paperback – 5 Nov 2002
- Choose from over 13,000 locations across the UK
- Prime members get unlimited deliveries at no additional cost
- Find your preferred location and add it to your address book
- Dispatch to this address when you check out
Customers Who Bought This Item Also Bought
Enter your mobile number below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
Getting the download link through email is temporarily not available. Please check back later.
To get the free app, enter your mobile phone number.
From the Back Cover
Praise for Elliotte Rusty Harold’s Processing XML with Java™
“The sophistication and language are very appropriate for Java and XML application developers. You can tell by the way the author writes that he too is a developer. He delves very deeply into the topics and has really taken things apart and investigated how they work. I especially like his coverage of ‘gotchas,’ pitfalls, and limitations of the technologies.”―John Wegis, Web Engineer, Sun Microsystems, Inc.
“Elliotte has written an excellent book on XML that covers a lot of ground and introduces current and emerging technologies. He helps the novice programmer understand the concepts and principles of XML and related technologies, while covering the material at a level that’s deep enough for the advanced developer. With a broad coverage of XML technologies, lots of little hints, and information I haven’t seen in any other book on the topic, this work has become a valuable addition to my technical library.”―Robert W. Husted, Member, Technical Staff, Requisite Technology, Inc.
“The code examples are well structured and easy to follow. They provide real value for someone writing industrial-strength Java and XML applications. The time saved will repay the cost of this book a hundred times over.
“The book also contains more of the pearls of wisdom we’ve come to expect from Elliotte Rusty Harold―the kind of pointers that will save developers weeks, if not months, of time.”―Ron Weber, Independent Software Consultant
Written for Java programmers who want to integrate XML into their systems, this practical, comprehensive guide and reference shows how to process XML documents with the Java programming language. It leads experienced Java developers beyond the basics of XML, allowing them to design sophisticated XML applications and parse complicated documents.
Processing XML with Java™ provides a brief review of XML fundamentals, including XML syntax; DTDs, schemas, and validity; stylesheets; and the XML protocols XML-RPC, SOAP, and RSS. The core of the book comprises in-depth discussions on the key XML APIs Java programmers must use to create and manipulate XML files with Java. These include the Simple API for XML (SAX), the Document Object Model (DOM), and JDOM (a Java native API). In addition, the book covers many useful supplements to these core APIs, including XPath, XSLT, TrAX, and JAXP.
Practical in focus, Processing XML with Java™is filled with over two hundred examples that demonstrate how to accomplish various important tasks related to file formats, data exchange, document transformation, and database integration. You will learn how to read and write XML documents with Java code, convert legacy flat files into XML documents, communicate with network servers that send and receive XML data, and much more. Readers will find detailed coverage of the following:
- How to choose the right API for the job
- Reading documents with SAX
- SAX filters
- Validation in several schema languages
- DOM implementations for Java
- The DOM Traversal Module
- Output from DOM
- Reading and writing XML documents with JDOM
- Searching XML documents with XPath
- Combining XSLT transforms with Java code
- TrAX, the Transformations API for XML
- JAXP, the Java API for XML Processing
In addition, the book includes a convenient quick reference that summarizes the major elements of all the XML APIs discussed. A related Web site, located at http://www.cafeconleche.org/books/xmljava/, contains the entire book in electronic format, as well as updates and links referenced in the book.
With thorough coverage of the key XML APIs and a practical, task-oriented approach, Processing XML with Java™ is a valuable resource for all Java programmers who need to work with XML.
About the Author
Elliotte Rusty Harold is an internationally respected writer, programmer, and educator. He is an Adjunct Professor of Computer Science at Polytechnic University in Brooklyn, where he lectures on Java and object-oriented programming. His Cafe con Leche Web site has become one of the most popular sites for information on XML. In addition, he is the author and coauthor of numerous books, the most recent of which are The XML Bible (John Wiley & Sons, 2001) and XML in a Nutshell (O'Reilly, 2002).
Top Customer Reviews
On that note, I would not recommend this book for a newbie (xml newbies can give it a try, Java newbies - don't even think about it!).
If you are not conversant with Java and XML, get the appropriately named book "Java and XML" from O'reilly and then progress onto this book. If you are a good Java programmer and you have a clue about XML and want to move to that next level, then look no further, this book is for you. I used it in an XML project at work and I have been bombarded with all the XML work since!
The book starts with a quick introduction to XML and then gets into how to create XML documents in your programs. The first four chapters cover everything you need to know about creating XML whether it is for XML-RPC, SOAP, or simply to store in a file. The next section covers parsing XML documents. SAX and DOM are compared and then the next eight chapters discuss these two methods of parsing documents, explaining how to use them, comparing them, and helping you determine how to decide which technique to use for which situation. The section on DOM explains not just how to parse documents using DOM but also how to create new documents. The final chapters of the book cover JDOM, XPATH, and XSLT.
Did I mention that this book is full of examples? The author doesn't rely on simply explaining how something works or how to use a technology (even though his explanations are excellent), he has examples to demonstrate everything he discusses. Each example builds upon the previous example and makes learning the techniques easy and enjoyable.
Most Helpful Customer Reviews on Amazon.com (beta)
Given this, where do you turn to learn XML? An excellent choice is this book. A voluminous and eloquent exposition of the uses of XML. Harold covers the latest versions of the SAX and DOM parsers, explaining the relative merits. As a java programmer, you should find the idea behind SAX simple. It uses a callback, similar to that in GUIs. Simpler, in fact, because you can only have a single callback. SAX's biggest drawback is that it does not build a tree of the document. DOM addresses this. Harold explains the tradeoffs, and how you can decide which to use. Plus, he describes JDOM, which is DOM-like, but written expressly for java. You should find JDOM far more intuitive than DOM.
There is one place where I must differ with the author. He claims that this book is for the experienced java programmer who has already had some XML. I think he is being too conservative; he doesn't want to oversell this book to someone who will not benefit from it. I claim that if you are experienced, by which I mean you have a year or more in java, then you have the intellectual wherewithal to gain, even if you have never seen a stitch of XML.
This book is really a substantial update of the author's Java Network Programming book by O'Reilly. It takes the subject to an entirely new space. For example, want to understand SAX exception handling using JDOM processing instructions ? This is THE book. There is more information about how XML parsers really work in this book then many of the other XML texts combined. (Although the O'Reilly XML Cookbook is really good as well).
Chapter 4 on converting flat files (he uses the US Federal Budget data) to XML is priceless. Worth the cost of the book alone!
To understand -most- of technical XML concepts, one has to understand so many stuff: What XML is really about othen than buzz some people is making, why/how one should use schemas (DTD, W3 XML-Schema, RelaxNG...), how XML data can be processed (parsing and transformation), how XML data can/should be stored, what Web Services/SOAP is about...
It's impossible to cover all these in a single or even a few books. So it's logical that "Processing XML with Java" focuses on a single dimension of XML: "Parsing and Trasformation"
Harold splits the book into 5 logical parts according to APIs, each 2 to 5 chapters:
- XML (Introduction and Overview),
- SAX (Simple API for XML: event based relatively low level API)
- DOM (most popular, cross language API)
- JDOM (Java only DOM-like API)
- XPATH/XSLT (Stylesheet transformation)
Each chapter includes an overview of the covered API(s), detailed description of classes & interfaces as well as examples showing how and when to use them.
"Processing XML with Java" includes fair amount of code which is readable and understandable. In fact it would be crazy, trying to learn XML processing without coding, since it requires knowledge of very specific APIs, libraries, interfaces etc. whatever you name.
Overall, I recommend the book to especially those who have beginner to intermediate level exposure to XML. In such a case, you can quickly pick the pros, cons, dos, don'ts and save much time in building your XML skills. After reading this book, next step would be learning more about XML schema languages, XSLT, Web Services and the story about XML-database.
If you've already worked with XML, used SAX, DOM and XSLT in a few real life projects, then I suggest you to check the online version of the book (at cafeconleche.org) before buying. Best would be to read a couple of chapters and decide yourself, whether you like it or not.
And kudos to Elliotte Rusty Harold for publishing an online (HTML) version. It's a brave decision that I know not so many authors have made so far (who doesn't know Thinking in Java/Bruce Eckel ?).
Disclaimer: I've received a copy of "Processing XML with Java" from the publisher for reviewing purpose.
The remainder of the book is devoted to the various APIs for parsing XML hence the subtitle "A Guide to SAX, DOM, JDOM, JAXP, and TrAX". Throughout the book the author creates clear code examples and very readable text. This serves to develop understanding and insight in reader. This particular technical topography is under continuous change. Adapting to these changes will be much easier after having read this book.
A lot of tips and "gotchas" are shared in the book, but it is arranged so that the developer grab what he needs or he can sit and camp awhile. The book text is available at the author's website, but I prefer to read the paper copy. If you are going to use XML and Java together, this book would be a good investment.