public static Map parseAdvicesXML(String advicesXML) throws PolicyException {
  if (debug.messageEnabled()) {
    debug.message("PolicyUtils.parseAdvicesXML():" + " entering, advicesXML= " + advicesXML);
  }
  Map advices=null;
  if (advicesXML != null) {
    Document document=XMLUtils.toDOMDocument(advicesXML,debug);
    if (document != null) {
      Node advicesNode=XMLUtils.getRootNode(document,ADVICES_TAG_NAME);
      if (advicesNode != null) {
        advices=XMLUtils.parseAttributeValuePairTags(advicesNode);
      }
 else {
        if (debug.messageEnabled()) {
          debug.message("PolicyUtils.parseAdvicesXML():" + " advicesNode is null");
        }
      }
    }
 else {
      if (debug.messageEnabled()) {
        debug.message("PolicyUtils.parseAdvicesXML():" + " document is null");
      }
    }
  }
  if (debug.messageEnabled()) {
    debug.message("PolicyUtils.parseAdvicesXML():" + " returning, advices= " + advices);
  }
  return advices;
}

public static Map parseAdvicesXML ( String advicesXML ) throws PolicyException { if ( debug . messageEnabled ( ) ) { debug . message ( "PolicyUtils.parseAdvicesXML():" + " entering, advicesXML= " + advicesXML ) ; } Map advices = null ; if ( advicesXML != null ) { Document document = XMLUtils . toDOMDocument ( advicesXML , debug ) ; if ( document != null ) { Node advicesNode = XMLUtils . getRootNode ( document , ADVICES_TAG_NAME ) ; if ( advicesNode != null ) { advices = XMLUtils . parseAttributeValuePairTags ( advicesNode ) ; } else { if ( debug . messageEnabled ( ) ) { debug . message ( "PolicyUtils.parseAdvicesXML():" + " advicesNode is null" ) ; } } } else { if ( debug . messageEnabled ( ) ) { debug . message ( "PolicyUtils.parseAdvicesXML():" + " document is null" ) ; } } } if ( debug . messageEnabled ( ) ) { debug . message ( "PolicyUtils.parseAdvicesXML():" + " returning, advices= " + advices ) ; } return advices ; }
parses an xml string representation of policy advices and returns a map of advices . the keys of returned map would be advice name keys . each key is a string object . the values against each key is a set of string ( s ) of advice values
