public RequestSet parseXML(){
  if (document == null) {
    return null;
  }
  Element reqSetElem=document.getDocumentElement();
  RequestSet reqSet=new RequestSet();
  setRequestSetAttributes(reqSetElem,reqSet);
  NodeList requests=reqSetElem.getElementsByTagName("Request");
  if (requests == null) {
    return reqSet;
  }
  int nodeLen=requests.getLength();
  for (int i=0; i < nodeLen; i++) {
    reqSet.addRequest(parseRequestElement((Element)requests.item(i)));
  }
  return reqSet;
}

public RequestSet parseXML ( ) { if ( document == null ) { return null ; } Element reqSetElem = document . getDocumentElement ( ) ; RequestSet reqSet = new RequestSet ( ) ; setRequestSetAttributes ( reqSetElem , reqSet ) ; NodeList requests = reqSetElem . getElementsByTagName ( "Request" ) ; if ( requests == null ) { return reqSet ; } int nodeLen = requests . getLength ( ) ; for ( int i = 0 ; i < nodeLen ; i ++ ) { reqSet . addRequest ( parseRequestElement ( ( Element ) requests . item ( i ) ) ) ; } return reqSet ; }
parses the tree from root element . please see requestset . java for the corresponding dtd of the requestset .
