RE: Need help

"Syloke Soong" <[email protected]>
Newsgroups gmane.comp.java.jdom.general
Message-ID <66627A4250B3FA4695A4FA338C896D3D017172DE@exchsvr.protedyne.protedyne.com>
... forgot to break the cases.


[code]
public final static Element traverse(Element e, int whomDoYouCall) {
  List children = e.getChildren();
  Element clone = null;
  switch
  {
    case 0:
      clone = processTreatmentplans(e);
	break;
    case 1:
      clone = processPlansGroup(e);
	break;
    case 2:
      clone = processPlan(e);
	break;
    case 3:
      clone = processGoal(e.getChild());
    default:
      return null;
  }
  
  if (whomDoYouCall<3)
    for (int i=0; i<children.size(); i++)
      clone.add(
        traverse((Element)children.get(i), whomDoYouCall++)
      );
  
  return clone;
}

[/code]
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender immediately. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Even though this company takes every precaution to ensure this email is virus-free, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
Protedyne Corporation, 1000 Day Hill Rd, Windsor, CT 06095, USA,                                                                  
www.protedyne.com

_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.