private String createChoiceXml(String choiceId,String choiceDescription,String nextMomentId,boolean depleteWeaponCharge,boolean incrementNumEnemiesDefeated,String iconResourceName){
  String xml="";
  xml+="<choice ";
  xml+="id='" + choiceId + "' >";
  xml+="<description>" + choiceDescription + "</description>";
  xml+=createNextMomentXml(nextMomentId);
  xml+="<outcome ";
  xml+="deplete_weapon='" + Boolean.toString(depleteWeaponCharge) + "' ";
  xml+="increment_enemies='" + Boolean.toString(incrementNumEnemiesDefeated) + "' />";
  if (iconResourceName != null) {
    xml+=createIconXML(iconResourceName);
  }
  xml+="</choice>";
  return xml;
}

private String createChoiceXml ( String choiceId , String choiceDescription , String nextMomentId , boolean depleteWeaponCharge , boolean incrementNumEnemiesDefeated , String iconResourceName ) { String xml = "" ; xml += "<choice " ; xml += "id='" + choiceId + "' >" ; xml += "<description>" + choiceDescription + "</description>" ; xml += createNextMomentXml ( nextMomentId ) ; xml += "<outcome " ; xml += "deplete_weapon='" + Boolean . toString ( depleteWeaponCharge ) + "' " ; xml += "increment_enemies='" + Boolean . toString ( incrementNumEnemiesDefeated ) + "' />" ; if ( iconResourceName != null ) { xml += createIconXML ( iconResourceName ) ; } xml += "</choice>" ; return xml ; }
a helper function to create an xml string representing a choice . choices are found within choice moments .
