I just need some ideas for an approach to sorting results.
Here’s the scenario:
XML file with two columns: State and Territory (All States the Customer covers)
SAX parser returns results where State = NY or Territory contains NY
Results to a ListView
I need to sort the results by records where the State is NY first and the Territory contains NY second. Sort is FIFO for both State and Territory.
I don’t really want to read through the XML twice, so I’m just looking for suggestions on how to execute that efficiently.
Right now, the best idea I have is to create two different list objects in my Sax Handler and then getListA, getListB in my Parser.
Just making sure I’m not missing some obvious alternative solution.
Thanks!
Actually, that works perfect.
Created a separate list object and getter. Funneled the record to the appropriate list in the handler, added one list to the other (addAll()) in the parser.
Works like a peach!