public NamingResponse parseXML(){
  if (document == null) {
    return null;
  }
  Element elem=document.getDocumentElement();
  namingResponse=new NamingResponse();
  String temp=elem.getAttribute("vers");
  if (temp != null) {
    namingResponse.setResponseVersion(temp);
  }
  temp=elem.getAttribute("reqid");
  if (temp != null) {
    namingResponse.setRequestID(temp);
  }
  NodeList attribs=elem.getElementsByTagName("Attribute");
  if (attribs != null && attribs.getLength() != 0) {
    parseAttributeTag(attribs);
  }
  NodeList exception=elem.getElementsByTagName("Exception");
  if (exception != null && exception.getLength() != 0) {
    Node node=exception.item(0);
    if (node != null) {
      namingResponse.setException(node.getNodeValue());
    }
  }
  return namingResponse;
}

public NamingResponse parseXML ( ) { if ( document == null ) { return null ; } Element elem = document . getDocumentElement ( ) ; namingResponse = new NamingResponse ( ) ; String temp = elem . getAttribute ( "vers" ) ; if ( temp != null ) { namingResponse . setResponseVersion ( temp ) ; } temp = elem . getAttribute ( "reqid" ) ; if ( temp != null ) { namingResponse . setRequestID ( temp ) ; } NodeList attribs = elem . getElementsByTagName ( "Attribute" ) ; if ( attribs != null && attribs . getLength ( ) != 0 ) { parseAttributeTag ( attribs ) ; } NodeList exception = elem . getElementsByTagName ( "Exception" ) ; if ( exception != null && exception . getLength ( ) != 0 ) { Node node = exception . item ( 0 ) ; if ( node != null ) { namingResponse . setException ( node . getNodeValue ( ) ) ; } } return namingResponse ; }
parses the response document . please see file namingresponse . dtd for the corresponding dtd of the namingresponse .
