Hi I am writing a XML Based Visual Studio application, whereby I need to import a simple matrix of 6 columns by 400 rows of data. The scenario is that the user puts in question number and the application looks up the question and display the 5 columns of the answer in the below format from the source data. I am having to trouble deciding how to structure the XML ?
(Note I will also have various other screen to maintain the source data file).
General Question Format to be shown on Final Screen
2.5 Autism is a lifelong developmental disability that affects how a person communicates with, and relates to,
other people. It also affects how they make sense of the world around them. (www.autism.org.uk)
2.7 Positives:
• Emergencies i.e. 999/112, GPS
• Easier to keep in touch
• Long Range communication
• Entertainment i.e. apps, camera, internet
Negatives:
• Distraction
• Cost
• Crime
• Cyber Bullying
5.18 Answer: D. All of these:
• Insurance companies can expect to pay out more in disaster claims.
• The fishing industry will suffer from low fish stocks.
• Some wine regions will no longer sustain grape crops
5.30 Answer: C: Recycling. (Recycling is the process through which waste materials are recovered and reprocessed for use in new products).
I also have an Excel table with this Table as follows :
Question No Answer Ref Answer Formatting Answer Description
2.5 Paragraph Autism is a lifelong developmental disability that affects how a person communicates with...
2.7 Paragraph Positives:
2.7 bullet Emergencies i.e. 999/112, GPS
2.7 bullet Easier to keep in touch
2.7 bullet Long Range communication
2.7 bullet Entertainment i.e. apps, camera, internet
2.7 Paragraph Negatives:
2.7 bullet Distraction
2.7 bullet Cost
2.7 bullet Crime
2.7 bullet Cyber Bullying
etc... (Not very readable with this Forum but you get the gist.
XML: OPTION 1 - Flat Record
<Question_Answer_Line>
<Question No>
<Answer Ref>
<Answer Formatting> ‘ Notice this field governs the way the screen will format the answer. i.e. buttlets
<Answer Description>
<Answer Ref Section>
<Answer Ref Colour>
<Answer Image>
<Answer Hyperlink>
</Question_Answer_Line>
XML: OPTION 2 - Master/Child Record Type Definition
<Question_Answer_MASTER_QUESTION>
<Question No>
<Answer Ref>
<Answer Description>
<Answer Ref Section>
<Answer Ref Colour>
<Answer Image>
<Answer Hyperlink>
<Question_Answer_Child> ‘ Notice Master/Child governs the way the screen will format the answer. i.e. buttlets
<Question No>
<Answer Ref>
<Answer Description>
<Question_Answer_Child>
</Question_Answer_MASTER_QUESTION> (or something like that).
The above XML OPTION 1 - is how I might proceed for the Schema definition but the alternative is to Master/Child type record definition… For the very experienced I would image you would make the latter option work but by putting the "Answer Formatting" tag I can control how the output should be displayed by the program.
Can anyone offer any advise ?
Thanks in advance. Kuldip.