title: split a string at a specific point till specific point using java
body: <p>i want to split my below string to get the expected output</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;
  &lt;CompareInformation&gt;
      &lt;request&gt;
          &lt;OrderInformation&gt;
              &lt;CardTypeUsed&gt;CreditCard&lt;/CardTypeUsed&gt;
              &lt;consumerId&gt;GIF&lt;/consumerId&gt;
          &lt;/OrderInformation&gt;
      &lt;/request&gt;
  &lt;/CompareInformation&gt;
  </code></pre>
  <p>Expected output</p>
  <pre><code>&lt;OrderInformation&gt;
              &lt;CardTypeUsed&gt;CreditCard&lt;/CardTypeUsed&gt;
              &lt;consumerId&gt;GIF&lt;/consumerId&gt;
          &lt;/OrderInformation&gt;
  </code></pre>