public static Map parseAttributeValuePairs(Node pNode){
  Node node=null;
  Set nodeSet=XMLUtils.getChildNodes(pNode,ATTRIBUTE_VALUE_PAIR);
  if (nodeSet == null) {
    debug.error("parseAttribiteValuePairs: " + "missing element " + ATTRIBUTE_VALUE_PAIR);
    return null;
  }
  HashMap attrValuePairs=new HashMap();
  Iterator nodes=nodeSet.iterator();
  while (nodes.hasNext()) {
    node=(Node)nodes.next();
    String attributeName=getAttributeName(node);
    if (attributeName == null) {
      debug.error("PolicyUtils.parseAttribiteValuePairs" + "():missing attribute name");
      return null;
    }
    Set values=getAttributeValues(node);
    if (values == null) {
      debug.error("PolicyUtils.parseAttribiteValuePairs" + "():missing attribute value");
      return null;
    }
    attrValuePairs.put(attributeName,values);
  }
  return attrValuePairs;
}

public static Map parseAttributeValuePairs ( Node pNode ) { Node node = null ; Set nodeSet = XMLUtils . getChildNodes ( pNode , ATTRIBUTE_VALUE_PAIR ) ; if ( nodeSet == null ) { debug . error ( "parseAttribiteValuePairs: " + "missing element " + ATTRIBUTE_VALUE_PAIR ) ; return null ; } HashMap attrValuePairs = new HashMap ( ) ; Iterator nodes = nodeSet . iterator ( ) ; while ( nodes . hasNext ( ) ) { node = ( Node ) nodes . next ( ) ; String attributeName = getAttributeName ( node ) ; if ( attributeName == null ) { debug . error ( "PolicyUtils.parseAttribiteValuePairs" + "():missing attribute name" ) ; return null ; } Set values = getAttributeValues ( node ) ; if ( values == null ) { debug . error ( "PolicyUtils.parseAttribiteValuePairs" + "():missing attribute value" ) ; return null ; } attrValuePairs . put ( attributeName , values ) ; } return attrValuePairs ; }
parses an xml node which represents attribute - value pairs and returns a map of such values .
