I have the following string. I want to extract the string between two words <cases> and </cases> using Java. I want to extract the string to form a valid xml as per my requirement. 
<cases><Final-Results><row>
          <CRDATTIM>2014-03-26-05.22.22.339840</CRDATTIM>
          <RECORDCD>C</RECORDCD>
          <CRNODE>01</CRNODE>
          <CKEY>2014-03-26-05.22.22.339840C01</CKEY>
          <STATCD>CREATED</STATCD>
          <UNITCD>CSMHCQA</UNITCD>
          <WRKTYPE>CALL</WRKTYPE>
          <issues><row>
      <IKEY>2014-03-26-05.22.22.193840T01</IKEY>
      <PRTY>999</PRTY>
      <ISSUEID>20140326-155047-DT81694</ISSUEID>
      <SUBJECT>Group</SUBJECT>
      <ISSTYP>GROUP</ISSTYP>
      <ISSCAT1>GROUP INQUIRY</ISSCAT1>
     </row></issues></row></Final-Results></cases><?xml version="1.0" encoding="UTF-8"?>
     <response>
        <FOLDERID>COMM*H</FOLDERID>
     </response>
I have tried with the following code. But its not working for me.
Pattern pattern = Pattern.compile("<cases>(.*?)</cases>");
Matcher matcher = pattern.matcher(string);
while (matcher.find()) {
    System.out.println(matcher.group(1));
}
Am I doing any mistake here?Could please share your idea to solve my issue? Thanks in advance.
 
     
    