public String toXML(String attrKey , String textKey) throws JSONException {
		try{
		String XMLString = "";
		for (String key : keyList) {
			
			String textValue="";
			String attrString="";
			String childString="";
			XMLString = XMLString.concat("<");
			XMLString = XMLString.concat(key);
			String className = jsonObjectItems.get(key).getClass().getCanonicalName();
			if (className=="com.jsonutils.xjson.JSONObject")
			{
				JSONObject tempJSONObject = this.getJSONObject(key);
				for (String externalKey : tempJSONObject.keyList)
				{
					if (externalKey.equals(attrKey))
					{
						JSONObject tempJSONObject2 = tempJSONObject.getJSONObject(externalKey);
						for (String internalKey : tempJSONObject2.keyList )
						{
							attrString= attrString.concat(" ");
							attrString= attrString.concat(internalKey);
							attrString= attrString.concat("=");
							attrString= attrString.concat("\"");
							attrString= attrString.concat(tempJSONObject2.getString(internalKey));
							attrString= attrString.concat("\"");
							attrString= attrString.concat(",");
						}
						attrString= attrString.substring(0, attrString.length()-1);
						
					}
					else if (externalKey.equals(textKey))
					{
						textValue= tempJSONObject.getString(externalKey);
					}
					else
					{
						childString= childString.concat("<");
						childString= childString.concat(externalKey);
						childString= childString.concat(">");
						childString= childString.concat(tempJSONObject.getString(externalKey));
						childString= childString.concat("</");
						childString= childString.concat(externalKey + ">");
					}
					
				}
				
			}
			
			else if (className=="com.jsonutils.xjson.JSONArray")
			{
				JSONArray jsonArr = this.getJSONArray(key);
				textValue= jsonArr.toXML(attrKey, textKey);
				
			}
			else
			{
				textValue= this.getString(key);
			}
				
			
			XMLString= XMLString.concat(attrString);
			XMLString= XMLString.concat(">");
			XMLString= XMLString.concat(textValue);
			XMLString= XMLString.concat(childString);
			XMLString= XMLString.concat("</");
			XMLString= XMLString.concat(key + ">" );
			
		}
		
		return XMLString;
		}
		catch (ClassCastException ex)
		{
			throw new JSONException("exception during accessing value for key");
		}
	}