Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Is this a GOOD use of XML?

 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 wasn't selected to go to mars. This tiny ad got in ahead of me:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic