This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes Best way to keep data? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Best way to keep data?" Watch "Best way to keep data?" New topic
Author

Best way to keep data?

Alexandre Siufy
Greenhorn

Joined: Jan 04, 2002
Posts: 1
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!
Shivaji Marathe
Ranch Hand

Joined: Jan 11, 2002
Posts: 203
Have you looked at the Collections API in Java.
The TreeSet or HashSet classes may be useful to you.
HTH
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Best way to keep data?
 
Similar Threads
Does XML complement Java?
can SAX or DOM parse only an XML string at a time?
Brainstorm on script projects
reading in a csv file
Beginner Java and XML questions