java取出xml return部分

	public static String dealWithGash(String oxml) {
	
		if (oxml.indexOf("<") >= 0) {
			oxml = oxml.substring(oxml.indexOf("<"));
		}
		if (oxml.indexOf(") >= 0) {
			oxml = oxml.substring(oxml.indexOf(")+9);
		}
		if (oxml.indexOf("]]>") >= 0) {
			oxml = oxml.substring(0,oxml.indexOf("]]>"));
		}
		if (oxml.indexOf("") >= 0) {
			oxml = oxml.substring(0, oxml.indexOf(""));
		}
		if (oxml.indexOf("") >= 0) {
			oxml = oxml.substring(0, oxml.indexOf(""));
		}
		oxml = oxml.replaceAll("<", "<").replaceAll(">", ">")
				.replaceAll(""", "\"").replaceAll("&", "&")
				.replaceAll("[\\x00-\\x08\\x0b-\\x0c\\x0e-\\x1f]", " ");

		return oxml;
	}

你可能感兴趣的:(java取出xml return部分)