← Prev in month ← Prev in thread

Create an XML data model from a list of questions?

From
Roger L Costello <>
To
"" <>
Date
2021-03-16T16:25:00Z
ID
<>
Thread
Create an XML data model from a list of questions?
Hi Folks,

Suppose you want to create a data model about restaurants. One approach is to create a list of questions that people typically want answered when searching for a restaurant:

1. Where is the restaurant?

2. What type of food do they serve?

3. How much does it cost?

4. When are they open?

5. How to contact them?

A direct mapping from question-to-XML yields:

<Restaurants>
    <Restaurant>
        <Where-is-the-restaurant>...</Where-is-the-restaurant>
        <What-type-of-food-do-they-serve>...</What-type-of-food-do-they-serve>
        <How-much-does-it-cost>...</How-much-does-it-cost>
        <When-are-they-open>...</When-are-they-open>
        <How-to-contact-them>...</How-to-contact-them>
    </Restaurant>
    ...
</Restaurants>

Is that a reasonable approach to creating some data models - create a list of questions that users typically want answered and then directly map the questions to element names?  Have you ever followed this approach? Advantages/disadvantages?

/Roger
← Prev in month ← Prev in thread