0

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>
Jeyasithar
  • 543
  • 4
  • 17

1 Answers1

0

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));
}
MihaiC
  • 1,618
  • 1
  • 10
  • 14