how do build a string of same nodes from JDBC response
I want to create a string of all the nodes that are the same. Using my example below, I want a string of all nodes that have more than one same name. For example, using the JDBC response below, I would want to create two strings. One for TRIP.ID and another string for all TRIP.SEQUENCE_NUM
Can anyone guide me through this ?
<Results>
<ResultSet fetchSize="0">
<Row rowNumber="1">
<TRIP.ID>80199662</TRIP.ID>
<TRIP.SEQUENCE_NUM>6</TRIP.SEQUENCE_NUM>
</Row>
<Row rowNumber="2">
<TRIP.ID>80199661</TRIP.ID>
<TRIP.SEQUENCE_NUM>5</TRIP.SEQUENCE_NUM>
</Row>
<Row rowNumber="3">
<TRIP.ID>80199660</TRIP.ID>
<TRIP.SEQUENCE_NUM>4</TRIP.SEQUENCE_NUM>
</Row>
<Row rowNumber="4">
<TRIP.ID>80199659</TRIP.ID>
<TRIP.SEQUENCE_NUM>3</TRIP.SEQUENCE_NUM>
</Row>
<Row rowNumber="5">
<TRIP.ID>80199658</TRIP.ID>
<TRIP.SEQUENCE_NUM>2</TRIP.SEQUENCE_NUM>
</Row>
<Row rowNumber="6">
<TRIP.ID>80199657</TRIP.ID>
<TRIP.SEQUENCE_NUM>1</TRIP.SEQUENCE_NUM>
</Row>
</ResultSet>
</Results>