if (ignoreClass (obj.getClass())) { if (debug) System.out.println ("----> ignored " + obj.getClass ()); return; }
  protected void addNodes(      Document doc, Object obj,       Element parentElement,       int searchDepth,	  Collection createdNodes) {    if (obj == null) {      return;    }	if (debug) {	  if (unique.containsKey (obj))		unique.put (obj, new Integer (((Integer)unique.get(obj)).intValue() +1));	  else		unique.put (obj, new Integer (1));	}	//System.out.println ("DataXMLize.addNodes - Search depth " + searchDepth);	if (debug && ((numAddNodes++ % 100) == 0))	  System.out.println ("addNodes called " + numAddNodes + " times");		String parentType = parentElement.getAttribute("type");	if (debug) 	  System.out.println ("parentType - " + parentType);	ObjectDescrip od = (ObjectDescrip) nameToDescrip.get (parentType.toLowerCase());	if (od == null && !printedDataWarning && !parentType.toLowerCase().startsWith("string")) {	  printWarning  (parentType);	  printedDataWarning = true;	}	      if (searchDepth <= 0) {	  generateElementReachedMaxDepth (doc, parentElement, obj, od);      return;    }	Map listProps = new HashMap ();    List propertyNameValues = getProperties (obj, listProps);	//	System.out.println ("getProps for parentType - " + parentType + " listProps = " + listProps);		if (listProps.isEmpty ())	  noListProcessProperties (propertyNameValues,							   doc,							   parentElement, searchDepth, od, createdNodes);	else {	  // add the nodes for the properties and values	  boolean foundDateAspect = false;	  PropertyNameValue [] currentLatLong = new PropertyNameValue [2];		  for (int i = 0; i < propertyNameValues.size();) {		PropertyNameValue pnv = 		  (PropertyNameValue) propertyNameValues.get(i);		if (checkForLatLong (doc, parentElement, pnv, currentLatLong)) {		  i++;		  continue;		}	  		foundDateAspect = checkForDateAspect (pnv, foundDateAspect);	  		boolean isFirst = false;		Integer numListElems = (Integer) listProps.get (pnv.name);		//	  System.out.println ("for " + pnv.name + " numListElems = " + numListElems);	  		boolean isList = (numListElems != null);		if (isList) {		  //System.out.println ("found list for " + pnv.name + " with " + numListElems + " elems.");				  isFirst = true;		  Element field = createField (doc, pnv.name, pnv.value, true, od);		  parentElement.appendChild (field);		  Element list = createList (doc);		  field.appendChild (list);		  for (int j = 0; j < numListElems.intValue(); j++) {			Element value = createValue (doc);			list.appendChild (value);			pnv = (PropertyNameValue) propertyNameValues.get(i++);			generateNonLeaf (doc, value, pnv.name, pnv.value, 							 searchDepth, isList, isFirst, od, createdNodes);			if (value.getFirstChild () != null) {			  Element objectNode = (Element) value.getFirstChild ().getFirstChild ();			  value.removeChild (value.getFirstChild ());			  if (objectNode != null)				value.appendChild (objectNode);			}			isFirst = false;		  }		}		else {		  generateElem (doc, parentElement, pnv.name, pnv.value, 						searchDepth, isList, isFirst, od, createdNodes);		  i++;		}	  }	}	  }