我需要<xml>__content__</xml>
java中以下响应字符串的一部分
Content-Type: application/xml; charset=UTF-8; name=response_xml<xml>...</xml>
EDIT
Now that I understand what you need, you can use a simple regex
to extract the text between the tags <xml>
and </xml>
public static void main(String[] args) {
String a="Content-Type: application/xml; charset=UTF-8; name=response_xml<xml>content</xml>";
final Pattern pattern = Pattern.compile("<xml>(.+?)</xml>");
final Matcher matcher = pattern.matcher(a);
matcher.find();
System.out.println(matcher.group(1));
}