public String[] parseConfiguration(Document document){
  NodeList nList=document.getElementsByTagName("Configuration");
  if (nList.getLength() == 0) {
    nList=document.getElementsByTagName("configuration");
  }
  if (nList.getLength() == 0) {
    nList=document.getElementsByTagName("Overrides");
  }
  if (nList.getLength() == 0) {
    nList=document.getElementsByTagName("overrides");
  }
  List configList=new ArrayList();
  for (int i=0; i < nList.getLength(); i++) {
    Element element=(Element)nList.item(i);
    configList.addAll(parseConfiguration(element));
  }
  return ((String[])configList.toArray(new String[configList.size()]));
}

public String [ ] parseConfiguration ( Document document ) { NodeList nList = document . getElementsByTagName ( "Configuration" ) ; if ( nList . getLength ( ) == 0 ) { nList = document . getElementsByTagName ( "configuration" ) ; } if ( nList . getLength ( ) == 0 ) { nList = document . getElementsByTagName ( "Overrides" ) ; } if ( nList . getLength ( ) == 0 ) { nList = document . getElementsByTagName ( "overrides" ) ; } List configList = new ArrayList ( ) ; for ( int i = 0 ; i < nList . getLength ( ) ; i ++ ) { Element element = ( Element ) nList . item ( i ) ; configList . addAll ( parseConfiguration ( element ) ) ; } return ( ( String [ ] ) configList . toArray ( new String [ configList . size ( ) ] ) ) ; }
parse an xml configuration from a document
