Java and XML: Solutions to Real-World Problems (Java Series (O'Reilly & Associates).)

Java and XML: Solutions to Real-World Problems (Java Series (O'Reilly & Associates).) by Brett McLaughlin

Java and XML: Solutions to Real-World Problems (Java Series (O'Reilly & Associates).)

Binding:
Paperback
Number of Pages:
550
ISBN:
0596001975
Product Group:
book
Publisher:
O'Reilly Media
Publication Date:
Aug. 22, 2001
BooksForGeeks.com ID:
2571

Brett McLaughlin's Java and XML is a well-informed guide to the partnership between two key technologies. For this 2nd edition, the author has slimmed down the introductory material on XML, making room for expanded coverage of fast-moving topics such as JAXP, SOAP and Web Services. There is plenty of new material, so this is a book worth buying even if you have the earlier edition. The author is a co-founder of JDOM, an XML document API, and is a well-known contributor to various other open-source projects. It is no surprise to find a focus on open-source tools and resources in this book.

This title does not aim to teach either Java or XML from scratch, although the first two chapters do offer an XML crash course. The following chapters cover SAX 2.0, a standard API for parsing XML, and after that there is a detailed look at the DOM (Document Object Model). JDOM gets extensive coverage, as you would expect from the author's involvement, and there is a strong chapter on JAXP, the official API for XML parsing from Sun Microsystems, explaining why it is widely misunderstood and how it complements other standards such as SAX. The second half of the book offers a chapter each on more advanced topics. One covers Web publishing frameworks, with a particular focus on Apache Cocoon. After that the author covers XML-RPC, SOAP and Web services. A chapter on content syndication shows how to use XSL and RSS (Rich Site Summary) to publish and consume information. Next comes data binding using the Castor or Zeus frameworks, or Sun's official JAXB API. Finally there is a brief look at up-and-coming APIs, and a concise reference for SAX, DOM, JDOM and JAXP.

Practical, informative and well-written, this book is ideal for professionals who are either working with Java and XML, or considering doing so. --Tim Anderson

Reviews for Java and XML: Solutions to Real-World Problems (Java Series (O'Reilly & Associates).)

  1. The title does not do the book justice!

    Rated 4 out of 5 stars, November 12th, 2005

    I borrowed this book off a friend from work with the view it was using XML with Java, which of course it covers very well, I felt that it seriously downplayed that it also covered Web publishing frameworks, RPC's, SOAP, Webservices, Content syndication and Data Binding.

    Maybe I would have stumbled across this book if the title hinted it covered 'distributed' or 'web services'.

    I've not used much 'distributed' code before, but when I found out about the XML-RPC I was gobsmacked how easy it was. Then gently you're introduced into the realm of SOAP and webservices and realise what all the hype is about.

    Now I've only reached chapter 12 (SOAP), but felt I had to write a review after reading one of the reviews that slated the book with only two stars.

    The 'Web Publishing Framework' chapter I felt needing more of a polish, I got to the end with too many questions buzzing around my head, all the other chapters left me thinking 'Yep, I understand now'.

    Here's my view of his comments, from my perspective..

    "To find out what SAX and DOM are you have to wade through lots of inconsequential information, only to discover that SAX allows you to parse an XML document on the fly, but doesn't retain it in memory; whereas DOM keeps the document in memory and allows you to manipulate it. Big deal. I could have worked this out by doing some Google searches."

    Well, you can find out anything using an internet search and most people would not be too sure when to use SAX versus DOM and the book does explain this in detail. I wouldn't say the chapter has any inconsequential information in it, it's the first book where I've felt the author pitches it right.

    "I was surprised to see that the first example on SAX actually includes a JTree, even though McLaughlin says to ignore it, it is typical of the book to include something irrelevant."

    I disagree, the JTree code is HCI specific and not a concern to explaining how SAX works, but rather than a dull console output you can see a 'real world' example of handling SAX - displaying it to the user. If you need to understand the JTree then that's obviously better covered in a Java Swing book! I congratulate the author on knowing where to draw the line.

    "What he doesn't say is that the JTree code is really there to make the example longer, so that there are more pages in the book, and so justifies a higher price. You're not going to spend 45 dollars on a weedly little manual, are you? You want something chunky."

    Ok, so his argument is that the 493 page document is say '2' pages bigger because of some HCI code which aids the user in visualising how the SAX reader does its job!? I'm sure the reviewer must be thinking there's more issues throughout the document?

    "Don't get me wrong, I don't enjoy dry, academic journals but at the same time I just wish they would get to the point quicker."

    Quicker = Google!

    Get the book, my only last point is that I've got edition 2 and it needs updating.. Amazon's photo implies the book is still at edition 2. Do not get put off by the one negative feedback on here!

  2. Disappointing

    Rated 2 out of 5 stars, January 12th, 2005

    This book did not come up to the expectations that were set by the other reviewers and by O'Reilly themselves.

    I bought Java & XML a couple of years ago. I diligently read the first couple of chapters, found it unhelpful and put it aside. To find out what SAX and DOM are you have to wade through lots of inconsequential information, only to discover that SAX allows you to parse an XML document on the fly, but doesn't retain it in memory; whereas DOM keeps the document in memory and allows you to manipulate it. Big deal. I could have worked this out by doing some Google searches.

    I am writing this review because I have just picked up my (dusty) copy from the bookshelf in the hope of finding something interesting. I was surprised to see that the first example on SAX actually includes a JTree, even though McLaughlin says to ignore it, it is typical of the book to include something irrelevant. What he doesn't say is that the JTree code is really there to make the example longer, so that there are more pages in the book, and so justifies a higher price. You're not going to spend 45 dollars on a weedly little manual, are you? You want something chunky.

    When reading this sort of book, I get the feeling that O' Reilly, and similar technical publishers, put a lot of effort into inflating their publications into bigger manuals with lots of pages. McLaughlin is obviously an expert, but he is constrained by the O'Reilly house style. This is deliberately conversational and longwinded so that while you feel that it is easy reading, you don't realize they are just making it more difficult to learn simple concepts. They also pepper the pages with long code examples. That way they sell more books. Other examples are XSLT and XSLT cooktop: both these O'Reilly manuals could have been condensed into one book by just cutting the waffle.

    Don't get me wrong, I don't enjoy dry, academic journals but at the same time I just wish they would get to the point quicker.

  3. Updated version of an excellent book

    Rated 5 out of 5 stars, November 12rd, 2002

    The first edition of this book was considered one of the best on the subject of Java and XML. This new edition has expanded to include the developments in Java and XML over the last year. The author gives a little less handholding on the basics of XML reducing a three chapter introduction in the first edition to a one chapter summary. SAX, DOM, and JDOM all are covered in detail with each topic getting an introduction and an advanced chapter. JAXP 1.1 is covered in sufficient detail. After the introduction to the basic Java/XML APIs, the author moves on to some other interesting topics.
    The chapters on web publishing frameworks and XML-RPC haven't changed much since the first edition. New chapters on SOAP, Web Services, and content syndication are welcome additions. The book ends with a look at data binding and JAXB.

    The examples in the book are extremely clear and concise, explaining each topic well without being overly simplistic. As with the first edition, the author assumes that you are familiar with Java but unlike the first edition he assumes you have a basic understanding of XML.

    If you are a Java developer and you are going to be working with XML then this book is required reading. The coverage of the Java/XML APIs is excellent. As for the other topics, it is a good introduction but for anyone working with SOAP or Web Services, other books will probably be required.

  4. Good overview but not a very good reference

    Rated 4 out of 5 stars, April 12th, 2002

    I'm relatively new to Java and XML with programming experience with XML with perl. I found the book very insightful into all areas of XML using Java, except, and here's the important bit, references to how one should use the XML once parsed. Techniques on tree building and tree structure searching would be great.. but sparse. The examples are on the web, and if you can follow java code, then i would recommend to just download the zip file and play around with that instead of buying this book.

    The sections on web-services are very concise and to the point and make an otherwise basic introductory book to Java with XML.

Our Network

BooksForGeeks.com is a participant in the Amazon Europe S.à r.l. Associates Programme, an affiliate advertising programme designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.co.uk