removeChildNamed (objectNode, "roleSchedule"); removeChildNamed (objectNode, "scheduleElements");
  protected void generateNonLeaf (Document doc, Element parentElement, 								  String propertyName, Object propertyValue,								  int searchDepth,								  boolean isList, boolean isFirst,								  ObjectDescrip od,								  Collection createdNodes) {	// this removes the class name following the $ for Locked classes	int index = propertyName.indexOf('$');	if (index > 0) {	  propertyName = propertyName.substring(0, index);	}	Element fieldNode = null;	if (!ignoreObject (propertyValue)) {	  fieldNode = createField(doc, propertyName, propertyValue, true, od);	  parentElement.appendChild(fieldNode);	}	if (debug) 	  System.out.println ("DataXMLize.nonLeaf - " + propertyName + " - " + propertyValue);	if (!skipObject (propertyValue)) {	  boolean isGlobal = isGlobal(propertyValue);	  boolean seenGlobalBefore = false;	  boolean removedObjectNode = false;	  if (isGlobal) {		seenGlobalBefore = globalToNode.containsKey (propertyValue);		if (debug) 		  System.out.println ("DataXMLize.nonLeaf - " + propertyValue + " is global");		if (debug && seenGlobalBefore)		  System.out.println ("DataXMLize.nonLeaf - " + propertyValue + " saw before.  Skipping.");	  }	  Element objectNode = null;	  if (!isGlobal || !seenGlobalBefore) {		objectNode = createObject(doc, propertyName, propertyValue, false);		fieldNode.appendChild (objectNode);		if (debug) 		  System.out.println ("DataXMLize.nonLeaf - adding object to field.");		removedObjectNode = false;		addNodes(doc, propertyValue, objectNode, (searchDepth-1), createdNodes);		// check to see if it's a role schedule, in which case, we need to append plan elem info		if (roleScheduleImplClass.isInstance(propertyValue)) {		  if (debug) 			System.out.println ("DataXMLize.nonLeaf - found role schedule");		  objectNode.appendChild(createInterval (doc, (RoleSchedule) propertyValue));		}		// if there are no fields in the object		if (objectNode.getChildNodes().getLength() == 0) {		  fieldNode.removeChild (objectNode);		  parentElement.removeChild (fieldNode);		  if (debug) 			System.out.println ("DataXMLize : nonLeaf - REMOVING - " + propertyName + " - " + propertyValue);		  removedObjectNode = true;		}	  }	 	  if (isGlobal) {		if (!removedObjectNode && !seenGlobalBefore)		  fieldNode.removeChild (objectNode);		if (debug) 		  System.out.println ("DataXMLize.nonLeaf - mapping " + propertyValue.getClass () + " to " + objectNode);		if (!seenGlobalBefore) {		  // store the node for later		  globalToNode.put (propertyValue, objectNode);		  // get the type		  String typeName = getTypeName (propertyValue, true);		  List instances = (List) classToInstances.get (typeName);		  if (instances == null)			classToInstances.put (typeName, instances = new ArrayList ());		  if (instances.contains (propertyValue))			System.out.println ("DataXMLize.nonLeaf - Huh? found second occurence of instance?");		  else 			instances.add (propertyValue);	  		  String name = (instances.size () > 1) ? typeName + instances.indexOf (propertyValue) : typeName;		  if (debug) System.out.println ("DataXMLize.nonLeaf - " + propertyValue.getClass () +  " " +										 instances.size () + " instances, " + 										 " name " + name);		  // store the object's global name		  globalToName.put (propertyValue, name);		  fieldNode.setAttribute("value", name);		}		else		  fieldNode.setAttribute("value", (String) globalToName.get(propertyValue));	  }	}  }