Wrong Jackson XML parsing in android application, do not read all fields in xml document



I have a simple android application for parsing xml with recursive nodes inside. I create a simple test and found out what not all values read by parser from document below:



<?xml version="1.0" encoding="utf-8"?>
<groups>
<group id="101" name="Group 0">
<operator id="5001" name="Operator 0.0"/>
<operator id="10676" name="Operator 0.1"/>

<group id="1200" name="Group 0.0">
<operator id="1" name="Operator 0.0.0"/>
<operator id="6" name="Operator 0.0.0"/>
</group>
<group id="9150" name="Group 0.1">
<operator id="23" name="Operator 0.1.0"/>
<operator id="17" name="Operator 0.1.1"/>
</group>

<operator id="26" name="Operator 0.2"/>

<group id="202" name="Group 0.2">
<operator id="13" name="Operator 0.2.0"/>
<operator id="14" name="Operator 0.2.1"/>
</group>

<operator id="22" name="Operator 0.3"/>
</group>


parser read "Group 0" inside this group it read only "Operator 0.3" and "Group 0.2". If I manually arrange xml source and all "operator" nodes group in one place parser read all data correct. So what I need to do, read all data from document without it manual rearranging?


I use Jackson library and aalto


test application


No comments:

Post a Comment