XML ingestion splits object and reads one object as two separate objects creating errors

Trying to ingest an xml with a format like;

<rule>
<name></name>
<description></description>
<options>
<key></key>
<value></value>
<key></key>
<value></value>
<key></key>
<value></value>
......(same as above>)
</options>
</rule> 
<rule>
<name></name>
<description></description>
<options>
<key></key>
<value></value>
<key></key>
<value></value>
<key></key>
<value></value>
......(same as above>)
</options>
</rule> 

And so on.....

However, it only stores the xml properly for a few and has trouble splitting on others. It will separate for some rules at