The following is the code for getChild(String). The only scenario in which it would return null is if your XMLFactory returned an empty Vector. Anything you can tell me about it? Any problems in the past, or will I have to dig deeper and find out where that node comes from?
EDIT: I did dig further, and it all comes down to your XMLFactory.parseXML(String) method. I smell bug. :-) If you wouldn't mind, I could look at it for you.
public XMLElement getChild(String name) {
Vector nodes = XMLFactory.getInstance().getMatchingNodes(node.getName()+"/"+name,node);
if(nodes.size() == 0)
return null;
XMLNode newNode = (XMLNode)nodes.get(0);
return new XMLElement(newNode);
}