Parse XML string and build a list of strings
<p>I have a string whose content is an XML. I want to separate the tags and make it into a list of string in Java. Below is a something what I am trying:</p>

<pre><code>string xml="&lt;hello&gt;&lt;hi a='a' b='b'/&gt;&lt;hi a='b' b='a'/&gt;&lt;/hello&gt;";
</code></pre>

<p>I want to separate it into a list like:</p>

<pre><code>list[0]="&lt;hi a='a' b='b'/&gt;"
list[1]="&lt;hi a='b' b='a'/&gt;"
</code></pre>

<p>I tried to do this via JAXB processor but doesn't work well. Also tried some stupid logic using split but that didn't help either. Is there any other way to achieve this?</p>