Lists Home |
Date Index |
- From: "Eddie Sheffield" <firstname.lastname@example.org>
- To: Peter Murray-Rust <email@example.com>
- Date: Fri, 26 Jun 1998 16:46:42 -0400
Peter Murray-Rust wrote:
> >Better here, I think, to use the simple keyword=value format
> >defined by java:
> If this is already parsed by Java I am happy to use it. But for structured
> things like menus we definitely want XML.
Yes, Java already parses property files in this format. Structured items
are a bit more trouble, and somewhat inflexible. But we use something
This example is how we handle internationalization. Simple change the
values on the RHS to whatever label you want to appear on the item.
For this application I would tend to favor the idea of using a property
file for the bare-bones bootstrapping, perhaps using an entry to point
to a more thorough config file in XML. This way one can take advantage
of the way the Java class loader can "hunt down" the properties file in
a nice, platform independent way.
Incidentally, the property files can also be placed in packages by
placing the file in the appropriate directory and prepending the package
name when retrieving it. Note that there is no "package" keyword that
must be placed in the file, nor must the filename itself be changed. So
to have a property file com.mycompany.myclasses.myapplet I would create
a file called myapplet.properties and place it in the directory
com/mycompany/myclasses. Then when I requested the ResourceBundle called
com.mycompany.myclasses.myapplet it would automatically be located, just
like one of the class files making up my applet.
xml-dev: A list for W3C XML Developers. To post, mailto:firstname.lastname@example.org
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:email@example.com the following message;
To subscribe to the digests, mailto:firstname.lastname@example.org the following message;
List coordinator, Henry Rzepa (mailto:email@example.com)