Discussion:
[XOM-interest] Help -Parsing XML file with 2 levels down
Santosh Shet
2013-12-08 08:00:07 UTC
Permalink
Hi,

I am trying to parse XML file using xom parser in java.
My XML file looks like as below:
<AdministrativeFee>
<MaxAdministrativeFee>0.25000</MaxAdministrativeFee>
<FeeSchedule>
<Unit>Percentage</Unit>
<BreakpointUnit>1</BreakpointUnit>
<LowBreakpoint>0</LowBreakpoint>
<HighBreakpoint>2000000000</HighBreakpoint>
<Value>0.25</Value>
</FeeSchedule>
<FeeSchedule>
<Unit>Percentage</Unit>
<BreakpointUnit>1</BreakpointUnit>
<LowBreakpoint>5000000000</LowBreakpoint>
<HighBreakpoint>7500000000</HighBreakpoint>
<Value>0.15</Value>
</FeeSchedule>
</AdministrativeFee>

I want to store each elements as key,value pairs inside Map without name
collisions as <FeeSchedule> have multiple sub elements. Could somebody
provide your thoughts how to achieve this.

Thanks in advance.

Santosh

Loading...