This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes Is this a GOOD use of XML? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Is this a GOOD use of XML?" Watch "Is this a GOOD use of XML?" New topic
Author

Is this a GOOD use of XML?

Heath Lilley
Ranch Hand

Joined: Jan 09, 2001
Posts: 72
Hello all,
The Problem...
I am creating an application that is going to generate customer readable literature from a database. This in formation needs to be somewhat customized to the customer based on some sort of project that we have/are going to do for them.
The deal is i have several items/materials that will be used on the project and depending on the items there uses will change. And i need to develop a way to interchange the usage description text for a given item based on the type of the item....
An Example...
I have 2 types of paint (acrylic and latex)
Latex is used in 3 coats, indoor surfaces only.
Acrylic is used in 4 coats outdoor surfaces only.
I need to out put...
#acrylic#
The Acrilic Green paint will be applied in 4 coats for every external surface.
#latex#
The Latex Green paint will be applied in 3 coats for every internal surface.

A Proposed solution...
So I was thinking of storing the display text as a field for this material in a DB table as something like the following...
(this is only formatted for clarity)

I could then write a parser to read through the above string and parse out what I need based on the rules i have in place.
The Question...
Is this a valid use of XML? I am pretty sure I could do it this way but is it a "good" solution. I guess I am looking for other examples or "cook books" for this kind of problem.

Any help is greatly appreciated.
Thank you.
Heath
[ April 22, 2003: Message edited by: Heath Lilley ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is this a GOOD use of XML?
 
Similar Threads
404 Not Found - install.page
Configuring Tomcat 5 on Win2K and Linux
Convert Html fields to Struts2 tags
getting started
web.xml causes 404 error