I am using Xstream to parse XML file.
the ideal format of the XML file is:
<Line>
<P Name="Src">5</P>
<P Name="Dst">4</P>
</Line>
however, sometimes, the infomation would be:
<Line>
<P Name="Src">2</P>
<P Name="Points">[3, 0]</P>
<Branch>
<P Name="Points">[0, 8]</P>
<P Name="Dst">5</P>
</Branch>
<Branch>
<P Name="Dst">3</P>
</Branch>
</Line>
The Points part could be ignored.
actually the above information means a fork line:
<Line>
<P Name="Src">2</P>
<P Name="Dst">5</P>
</Line>
<Line>
<P Name="Src">2</P>
<P Name="Dst">3</P>
</Line>
Can I use xstream to achieve this objective? split the branch into two Line object?