I have a somewhat large file (~500KiB) with a lot of small elements (~3000). I want to pick one element out of this and parse it to a java class.
Attributes Simplified
<xml>
<attributes>
<attribute>
<id>4</id>
<name>Test</id>
</attribute>
<attribute>
<id>5</id>
<name>Test2</name>
</attribute>
<!--3000 more go here-->
</attributes>
class Simplified
public class Attribute{
private int id;
private String name;
//Mutators and accessors
}
I kinda like XPath, but people suggested Stax and even VDT-XML. What should I do.