Reputation: 535
I need <xml>__content__</xml>
part from the following response string in java
Content-Type: application/xml; charset=UTF-8; name=response_xml<xml>...</xml>
Upvotes: 0
Views: 96
Reputation: 1583
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));
}
Upvotes: 0