System.out.println(99);
  protected RuleParameter parseRuleParamNode(Element ruleParamNode) {    RuleParameter rp = null;    String paramName = ruleParamNode.getAttributes().getNamedItem("name").getNodeValue();    NodeList nl = ruleParamNode.getChildNodes();    Node child = null;    for (int i=0; i<nl.getLength(); i++) {      child = nl.item(i);      if (child.getNodeType() == Node.ELEMENT_NODE)	break;    }    if (child.getNodeType() != Node.ELEMENT_NODE)      return null;    String nodeType = child.getNodeName();    //System.out.println("ParamName " + paramName + " paramType " + nodeType);    if (nodeType.equals("Integer")) {      String stringval = child.getAttributes().getNamedItem("value").getNodeValue();      Integer val = Integer.valueOf(stringval);      stringval = child.getAttributes().getNamedItem("min").getNodeValue();      int min= Integer.valueOf(stringval).intValue();      stringval = child.getAttributes().getNamedItem("max").getNodeValue();      int max = Integer.valueOf(stringval).intValue();      IntegerRuleParameter irp = 	new IntegerRuleParameter(paramName, min, max);      //System.out.println("new IntegerRuleParameter(" + paramName       //+ ", " + min  +", " + max + ")" );      try {	irp.setValue(val);      } catch (RuleParameterIllegalValueException ve) {	System.out.println(ve);      }      rp = irp;    } else if (nodeType.equals("Double")) {      String stringval = child.getAttributes().getNamedItem("value").getNodeValue();      Double val = Double.valueOf(stringval);      stringval = child.getAttributes().getNamedItem("min").getNodeValue();      double min= Double.valueOf(stringval).doubleValue();      stringval = child.getAttributes().getNamedItem("max").getNodeValue();      double max = Double.valueOf(stringval).doubleValue();      DoubleRuleParameter drp = 	new DoubleRuleParameter(paramName, min, max);//    System.out.println("new DoubleRuleParameter(" + paramName // 			 + ", " + min  +", " + max + ")" );      try {	drp.setValue(val);      } catch (RuleParameterIllegalValueException ve) {	System.out.println(ve);      }      rp = drp;    } else if (nodeType.equals("Long")) {      String stringval = child.getAttributes().getNamedItem("value").getNodeValue();      Long val = Long.valueOf(stringval);      stringval = child.getAttributes().getNamedItem("min").getNodeValue();      long min= Long.valueOf(stringval).longValue();      stringval = child.getAttributes().getNamedItem("max").getNodeValue();      long max = Long.valueOf(stringval).longValue();      LongRuleParameter lrp = 	new LongRuleParameter(paramName, min, max);//    System.out.println("new LongRuleParameter(" + paramName // 			 + ", " + min  +", " + max + ")" );      try {	lrp.setValue(val);      } catch (RuleParameterIllegalValueException ve) {	System.out.println(ve);      }      rp = lrp;    } else if (nodeType.equals("String")) {      String stringval = child.getAttributes().getNamedItem("value").getNodeValue();      StringRuleParameter srp 	= new StringRuleParameter(paramName);//       System.out.println("new StringRuleParameter(" + paramName + ")" +// 			 "  value=" + stringval);      try {	srp.setValue(stringval);      } catch (RuleParameterIllegalValueException ve) {	System.out.println(ve);      }      rp = srp;    } else if (nodeType.equals("Class")) {      String interfaceType = child.getAttributes().getNamedItem("interface_type").getNodeValue();      String classType = child.getAttributes().getNamedItem("class_type").getNodeValue();      try {	Class c = Class.forName(interfaceType);	ClassRuleParameter crp = 	  new ClassRuleParameter(paramName, c);        c = Class.forName(classType);        crp.setValue(c);        System.out.println(99);	rp = crp;      } catch (Exception e) {	System.out.println("Couldn't create class " + interfaceType + e);      }     } else if (nodeType.equals("Boolean")) {      String boolvalue = child.getAttributes().getNamedItem("value").getNodeValue();      boolvalue = boolvalue.trim();      Boolean b=null;      if (boolvalue.compareToIgnoreCase("true") == 0)	b = new Boolean(true);      else if (boolvalue.compareToIgnoreCase("false") == 0)	b = new Boolean(false);            BooleanRuleParameter brp =  new BooleanRuleParameter(paramName);      if (b !=null){	try {	  brp.setValue(b);	} catch (RuleParameterIllegalValueException e) {	  System.out.println("Couldn't set value for boolean rule parameter "			     + paramName);	  System.out.println(e);	}      }      rp = brp;    } else if (nodeType.equals("Enumeration")) {      String stringval = child.getAttributes().getNamedItem("value").getNodeValue();      // Read the children, stuff them in an array      NodeList nlist = child.getChildNodes();      int nlength = nlist.getLength();      Vector enumOptVector = new Vector();      for (int i=0; i<nlength; i++) {	Node enumOptionNode = nlist.item(i);	if (enumOptionNode.getNodeType() != Node.ELEMENT_NODE)	  continue;	enumOptVector.addElement( enumOptionNode.getAttributes().getNamedItem("value").getNodeValue());      }            String [] enumOptions = new String[enumOptVector.size()];      for (int i=0; i<enumOptVector.size(); i++)	enumOptions[i] = (String) enumOptVector.elementAt(i);	      EnumerationRuleParameter erp = 	new EnumerationRuleParameter(paramName, enumOptions);//       System.out.println("new EnumerationRuleParameter(" + paramName // 			 + enumOptions +")" );      try {	erp.setValue(stringval);      } catch (RuleParameterIllegalValueException ve) {	System.out.println(ve);      }      rp = erp;    } else if (nodeType.equals("KeySet")) {	String default_value = 	    child.getAttributes().getNamedItem("value").getNodeValue();		// Read the children, stuff them in an array	NodeList nlist = child.getChildNodes();	int nlength = nlist.getLength();	Vector keyVector = new Vector();	for(int i = 0; i < nlength; i++) {	    Node keyNode = nlist.item(i);	    if (keyNode.getNodeType() != Node.ELEMENT_NODE)		continue;	    String key = keyNode.getAttributes().getNamedItem("key").getNodeValue();	    String value = keyNode.getAttributes().getNamedItem("value").getNodeValue();	    keyVector.addElement(new KeyRuleParameterEntry(key, value));	}	KeyRuleParameterEntry []keys = 	    new KeyRuleParameterEntry[keyVector.size()];	for(int i = 0; i < keys.length; i++) 	    keys[i] = (KeyRuleParameterEntry)keyVector.elementAt(i);	KeyRuleParameter krp = new KeyRuleParameter(paramName, keys);	try {	    krp.setValue(default_value);	} catch (RuleParameterIllegalValueException ve) {	    System.out.println(ve);	}	rp = krp;    } else if (nodeType.equals("RangeSet")) {	String default_value = 	    child.getAttributes().getNamedItem("value").getNodeValue();		// Read the children, stuff them in an array	NodeList nlist = child.getChildNodes();	int nlength = nlist.getLength();	Vector rangeVector = new Vector();	for(int i = 0; i < nlength; i++) {	    Node rangeNode = nlist.item(i);	    if (rangeNode.getNodeType() != Node.ELEMENT_NODE)		continue;            int min = Integer.valueOf(rangeNode.getAttributes().getNamedItem                                        ("min").getNodeValue()).intValue();            int max = Integer.valueOf(rangeNode.getAttributes().getNamedItem                                      ("max").getNodeValue()).intValue();            NodeList valList = rangeNode.getChildNodes();            Object value = null;            for (int j = 0; j < valList.getLength(); j++) {              Node valNode = valList.item(j);              String valType = valNode.getNodeName();              switch (valNode.getNodeType()) {              case Node.ELEMENT_NODE:                if (valType.equals("String")) {                  value = valNode.getAttributes().getNamedItem("value").getNodeValue();                } else {                  value = parseRuleParamNode((Element) valNode);                }                break;              default:                //System.out.println("Node type: " + valNode.getNodeType());              }            }            if (value == null) {              System.err.println("XMLPolicyCreator: unable to parse range entry value for " +                                 paramName + ". Min = " + min + " , max = " + max);            } else {              rangeVector.addElement(new RangeRuleParameterEntry(value, min, max));            }        } 	RangeRuleParameterEntry []ranges = 	    new RangeRuleParameterEntry[rangeVector.size()];	for(int i = 0; i < ranges.length; i++) 	    ranges[i] = (RangeRuleParameterEntry)rangeVector.elementAt(i);	RangeRuleParameter rrp = new RangeRuleParameter(paramName, ranges);	try {	    rrp.setValue(default_value);	} catch (RuleParameterIllegalValueException ve) {	    System.out.println(ve);	}	rp = rrp;    }    return rp;  }