O'Reilly logo

J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software by Art Taylor

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Retrieving the Value of a Specific Node using DOM

The DOM API provides a useful set of classes and methods for moving through a DOM object, but what is lacking are some convenience methods for performing certain operations. For instance, being able to search for a single node and retrieve the corresponding value of that node requires a set of programmatic loops to be executed using the standard DOM API. (Other XML parsers provide better interaction with the Java collection API to provide this functionality.)

Coding a series of loops to retrieve a single value is not always the most convenient way to use DOM. While this may be appropriate for operations where the entire contents of a DOM object must be parsed, it becomes cumbersome when only certain ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required