nextSibling will return the node to the right - or null if we are at the last sibling.
Take a look at the file cia.xml, it contains an element for every node taken from the cia world factbook.
equals
to compare strings. For example
country.getAttribute("region").equals("Africa")
The method getElementsByTagName(t) is a handy method of Document.
It returns a NodeList - this in turn has two methods
item(i) and getLength()
name for item 246 of the node list,
it should be the record for 'United Kingdom'. Recall that you must
recast this as an Element