String parentName = root.getTagName(); // Verify that any Required tags are present if( required ) { NodeList nl = root.getElementsByTagName( tagName ); if( nl.getLength() < 1 ) throw new MissingRequiredTag( tagName, parentName ); } // Proccess all child tags nl = root.getChildNodes(); for(int i=0; i