public ResponseSet parseXML(){
  if (document == null) {
    return null;
  }
  Element responseSetElem=document.getDocumentElement();
  ResponseSet responseSet=new ResponseSet();
  setResponseSetAttributes(responseSetElem,responseSet);
  NodeList responses=responseSetElem.getElementsByTagName("Response");
  if (responses == null) {
    return responseSet;
  }
  int nodeLen=responses.getLength();
  for (int i=0; i < nodeLen; i++) {
    responseSet.addResponse(parseResponseElement((Element)responses.item(i)));
  }
  return responseSet;
}

public ResponseSet parseXML ( ) { if ( document == null ) { return null ; } Element responseSetElem = document . getDocumentElement ( ) ; ResponseSet responseSet = new ResponseSet ( ) ; setResponseSetAttributes ( responseSetElem , responseSet ) ; NodeList responses = responseSetElem . getElementsByTagName ( "Response" ) ; if ( responses == null ) { return responseSet ; } int nodeLen = responses . getLength ( ) ; for ( int i = 0 ; i < nodeLen ; i ++ ) { responseSet . addResponse ( parseResponseElement ( ( Element ) responses . item ( i ) ) ) ; } return responseSet ; }
parses the tree from root element . please see responseset . java for the corresponding dtd of the responseset .
