public NotificationSet parseXML(){
  if (document == null) {
    return null;
  }
  Element notifSetElem=document.getDocumentElement();
  NotificationSet notificationSet=new NotificationSet();
  setNotificationSetAttributes(notifSetElem,notificationSet);
  NodeList notifs=notifSetElem.getElementsByTagName("Notification");
  if (notifs == null) {
    return notificationSet;
  }
  int nodeLen=notifs.getLength();
  for (int i=0; i < nodeLen; i++) {
    notificationSet.addNotification(parseNotificationElement((Element)notifs.item(i)));
  }
  return notificationSet;
}

public NotificationSet parseXML ( ) { if ( document == null ) { return null ; } Element notifSetElem = document . getDocumentElement ( ) ; NotificationSet notificationSet = new NotificationSet ( ) ; setNotificationSetAttributes ( notifSetElem , notificationSet ) ; NodeList notifs = notifSetElem . getElementsByTagName ( "Notification" ) ; if ( notifs == null ) { return notificationSet ; } int nodeLen = notifs . getLength ( ) ; for ( int i = 0 ; i < nodeLen ; i ++ ) { notificationSet . addNotification ( parseNotificationElement ( ( Element ) notifs . item ( i ) ) ) ; } return notificationSet ; }
parses the tree from root element . please see notificationset . java for the corresponding dtd of the notificationset .
