/**
  * This method is used primarily at the client side to reconstruct a
  * <code>SessionResponse</code> object based on the XML document received
  * from server. The DTD of this XML document is described above.
  *
  * @param xml The <code>SessionResponse</code> XML document.
  */
 public static function parseXML($xml)
 {
     $parser = new SessionResponseParser($xml);
     return $parser->parseXML();
 }
 /**
  * Parse Session Elements.
  *
  * @param nodelist NodeList of Session element.
  */
 private function parseSessionElements($nodelist)
 {
     // parse session one by one
     for ($i = 0; $i < $nodelist->length; $i++) {
         // get one Session element
         $sess = $nodelist->item($i);
         // parse one Session element
         $sessionInfo = SessionResponseParser::parseSessionElement($sess);
         // add to sessionResponse
         $this->sessionResponse->addSessionInfo($sessionInfo);
         //            SessionRequestParser.debug.message("In parse session "
         //                    + sessionInfo.toString());
     }
 }