Re: XML parser and writer



Brandon McCombs <none@xxxxxxxx> wrote:

Jeff Higgins wrote:
Jeff Higgins wrote:
Brandon McCombs wrote:
Hey guys,

I'm writing a program to help people track various items and placing them
on a calendar. These items are mainly ones that reoccur (monthly bills
for example). Each item (or task) has various properties that are set for
it and I was thinking of storing all the data in an XML file. I'd parse
the file and have the data available throughout the execution of the
program. Updates to the file would occur when someone edits a task to
change its re-occurrence frequency, etc. Therefore I will need to both
easily parse and write new XML files. I don't have a DTD or schema
developed and I may later so any API I use will have to work w/o that for
now. Can anyone suggest a simple API for parsing/writing my own made-up
XML files? I've ruled out SAX since it only parses and was thinking of
using DOM but I don't know if that will work because I've never did any
programming with XML before.

thanks for any pointers

Maybe a Java-XML binding framework?
XStream, Castor, JAXB come to mind.

OTOH, why not some database technology?



I thought about an internal (to the app) database however I wanted to
strike a balance between beginning and advanced user configurability and
the ease with which to carry the user settings from computer to
computer. In my mind, an advanced user can edit the XML file directly at
the risk of messing stuff up (that's where it would be nice to
eventually have a schema defined) instead of using a GUI interface I'll
eventually create for beginner users. Simply copying the XML file from
1 computer to another makes it easy for a user to use the application on
multiple computers if desired (although it would be up to them to keep
them sync'ed up).

Using a database made both of those things more difficult in my mind. An
advanced user would have no way of modifying an internal db and an
external db would just be overkill and make the installation of the app
overly complicated.

Any thoughts to the contrary? Maybe my knowledge is incorrect regarding
internal (embedded?) databases.
Most of the open source embedded databases including the two that can
have their tables in memory (HSQLDB and H2) can be embedded and,
simultaneously, client-server. That means that a user can change them
using, say, OpenOffice Base. You may also find OpenOffice Base a
useful RAD tool for building your GUI interface. The problem of
synchronizing the configuration files may be eased by using database
replication which is well understood. I have list of embedded
databases at http://database.profectus.com.au/#java. There are some
tools and add-ons for synchronising these databases but I have not
used them.
.



Relevant Pages

  • Re: DBIx::XML::DataLoader
    ... Is there a package or utility that can read an XML file of the sort I ... The dbinfo specifies the login ... credentials to the database, and the database. ... And, I have no idea what XPATH is, let alone what to do with it. ...
    (comp.lang.perl.misc)
  • Re: XML parser and writer
    ... them on a calendar. ... set for it and I was thinking of storing all the data in an XML file. ... why not some database technology? ... Tasklist the DOM would quickly become unwieldy especially if you have any ...
    (comp.lang.java.programmer)
  • RE: Backup Log Links dont work in Server Management Console
    ... Check the database connection information and make sure that the database ... "Rob Currier" wrote: ... It created a new xml file with the same name. ... >> for the backup and last backup is correct. ...
    (microsoft.public.windows.server.sbs)
  • DBIx::XML::DataLoader
    ... Is there a package or utility that can read an XML file of the sort I ... credentials to the database, and the database. ... Also obviously not all columns in the database are keys or indeces. ...
    (comp.lang.perl.misc)
  • Re: XML parser and writer
    ... I thought about an internal database however I wanted to strike a balance between beginning and advanced user configurability and the ease with which to carry the user settings from computer to computer. ... In my mind, an advanced user can edit the XML file directly at the risk of messing stuff up instead of using a GUI interface I'll eventually create for beginner users. ...
    (comp.lang.java.programmer)