This section will help us access the information about the cars owned by Jane, using the following code. I have divided the code to be added to our main() function in six parts:
- So, in the pursuit of finding all the cars owned by Jane, let's see what functionality our XML document provides for us right off the bat. If we take a look at code completion to quickly scan through our list of methods, we can call dom from our Document instance. We're going to see the getDocumentElement() method return an element for us:
This is probably a good way to start. This method returns the top-level element in our XML; in ...