How to keep values in sync between an XML configuration file and a database table?

paspsweepsifs

New Member
I'm structuring in a hierarchical way in levels. By example. \[code\]Category 7 Objective 7.1 [GeneralExpectation=''] A [Expectation=''] B [Expectation=''] C [Expectation=''] Objective 7.2 [GeneralExpectation=''] A [Expectation=''] B [Expectation=''] Objective 7.3 [GeneralExpectation=''] A [Expectation='']Category 8 ...\[/code\]I guess it will be convenient to store this information in a xml file instead in a database.\[code\]<Levels> <Level Id=7> <Categories> <Category Id=1 Name="Numbers, Operations, and Quantitative Reasoning" Expectation="The student will demonstrate an understanding of numbers, operations, and quantitative reasoning."> <Objective Id="7.1" Name="Number, operation, and quantitative reasoning." GeneralExpectation="The student represents and uses numbers in a variety of equivalent forms. The student is expected to"> <SubObjective Id="A" Expectation="compare and order integers and positive rational numbers; Supporting Standard" /> <SubObjective Id="B" Expectation="convert between fractions, decimals, whole numbers, and percents mentally, on paper, [or with a calculator]; and Readiness Standard" /> </Objective> </Category> <Category Id=2 Name="Patterns, Relationships, and Algebraic Reasoning" Expectation="The student will demonstrate an understanding of patterns, relationships, and algebraic reasoning."> </Category> </Categories> </Level></Levels>\[/code\]I did this because I need to access this information in a \[code\]TreeView\[/code\] control in WPF. But at the same time, I have a table in my SQL Database where needs to store the Level objective which the user is utilizing: \[code\]7.1A, 7.1B, 7.1C, 7.2A\[/code\].Is this a good practice? Or I'm not preserving the relationship between the two data.
 
Back
Top