This week's book giveaways are in the Refactoring and Agile forums. We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line! See this thread and this one for details.
Hello, I am sort of new to Java (I'm fairly good with Perl), and I have this pet project that I'd like to do entirely in Java. It's basically an app to organize collections (CDs, etc). I don't want to use databases, so I thought of using XML to store the data, and this is where I ran into my first major doubt: how do I access/map the XML data in Java? My initial idea was to parse the XML and put everything into hashtables (common solution in Perl), but I suspect there's a better (more Java-like) way to do this... Of course, once the data is mapped in memory, I must be able to easily sort through it, as well as pick any one individual set. I appreciate your ideas/input. Thanks!
posted 14 years ago
Have you looked at the Collections API in Java. The TreeSet or HashSet classes may be useful to you. HTH