I have a xml string in java that I need to break up into smaller strings. For example, given the following:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<employee id="111">
<firstName>Lokesh</firstName>
<lastName>Gupta</lastName>
<location>India</location>
</employee>
<employee id="222">
<firstName>Alex</firstName>
<lastName>Gussin</lastName>
<location>Russia</location>
</employee>
<employee id="333">
<firstName>David</firstName>
<lastName>Feezor</lastName>
<location>USA</location>
</employee>
How can I parse without any noticeable delimiters to obtain:
string1 = "<employee id="111"> <firstName>Lokesh</firstName> <lastName>Gupta</lastName> <location>India</location> </employee>"
string2 = "<employee id="222"> <firstName>Alex</firstName> <lastName>Gussin</lastName> <location>Russia</location> </employee>"
string3 = "<employee id="333"> <firstName>David</firstName> <lastName>Feezor</lastName> <location>USA</location> </employee>"
Any ideas are appreciated. Thanks!