I am developing a survey tool. The survey will be very static, and because of this, I can avoid creating a kind of desktop designer-researcher to post 167 questions in the survey (all questions on 1-5 ratings in a box with a radio or layout).
I was thinking about creating survey questions in a large XML file, but my non-technical employee who will make frequent changes to the survey is likely to do something that violates the integrity / validity of the original XML file (consider punctuation and special characters).
An XML file might look something like this:
<questions> <question> <type>checkbox</type> <text>Which beers do you like most</text> <choices>Bud,Miller,Piels</choices> <Required>true</Required> </question> <question> <type>radio</type> <text>Which beer is your favorite</text> <choices>Bud,Miller,Piels</choices> <Required>true</Required> </question> </questions>
Please use your imagination that this structure will be a little more complicated and that there will be 165 more questions.
, - , . 167 , , 37 - - , 37.
.Net:
-, . p-, .asp.,
questions q = new questions() q.type = "checkbox"; q.text = "which beers do you enjoy"' q.choices = "Bud,Miller,Peils"; q.required = true; q.add q.type = "radio"; q.text = "what is your favorite beer"; q.choices = "Bud,Miller,Peils"; q.required = true; q.add
, .cs ( , ) , .
, , :
. XML, XML .
WWYD - ? ?
- , .
XML ., XML., ., , XML, .
??, .?, , .
XML .XML XmlReaderdoug, .XML.XML (A List)., IEnumerable., IEnumerable.
WPF WinForms.ListBox DataTemplate.DataTemplate , hassel., . , RadioButtons, . LINQ , CollectionViewSource.
XML , ..
, XML XSD - , .
Excel... CSV, , Excel, . , , , CSV, .
, Excel, / XMl.
, , YAML.
YAML - , , , C, Perl Python, XML .
:
questions: - id: 1 type: checkbox text: Which beers do you like most choices: Bud,Miller,Piels Required: true - id: 2 type: radio text: Which beer is your favorite choices: Bud,Miller,Piels Required: true
YAML .NET( ):
https://github.com/aaubry/YamlDotNet
http://yaml.codeplex.com/
http://www.codeproject.com/Articles/28720/YAML-Parser-in-C
http://yaml-net-parser.sourceforge.net/
xml, , . XML-, . http://symbolclick.com/
, .
;
a: , , , / , , .. , "" , !
b: , /, , ? - ? , , / - , , XML , -, ?
, , , , ( ). , , ! , , , - , .
TL;DR; , , , , , ( , , ). , , , .
winforms GUI, .
xml-, xml .? , . ( xml, , CSV).. , , .
If your colleagues do not have programming or xml editing experience, they will hate you if you instruct them to edit some kind of "code".Our secretaries put a hand in front of their faces and started chanting "no, no, no ..." when I tell them how to manage VBA macros.
Source: https://habr.com/ru/post/1527591/More articles:https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1527586/how-to-copy-files-to-commonappdatafolder&usg=ALkJrhhQHsTHMp30bgc2SDofyZBIinczzwJavaFX: setHgrow (...) not working - javaC # If Equals Case is Insensitive - c #Position of iOS spriteKit child nodes relative to view coordinates - iosUsing whodunnit to get a user instance - ruby-on-railsLog Versioning - ruby-on-railsНужна очень настроенная большая сетка Winforms - user-interfaceValue in carry flag - assemblyHow to execute the mongo cloneCollection command to copy a collection to a remote server - mongodbUse python to process and create input files for external software - pythonAll Articles