best xml format for store it in sql server database -


i have workflow in xml format this:

... <workflow>   <tasks>     <task type="start" id="task_038517r" name="addrequest">       <form id="form_3y245d1"/>           </task>     ...     <task type="final" id="task_1sytah6" name="confirmationrequest">       <form id="form_3y245d1"/>     </task>   </tasks>  </workflow> ... 

and can change format:

... <workflow>   <tasks>     <task>       <type>start</type>       <id>task_038517r</id>       <name>addrequest</name>       <form>         <id>from_3jfu845</id>       </form>     </task>     ...     <task>       <type>final</type>       <id>task_1sytah6</id>       <name>confirmationrequest</name>       <form>         <id>form_3y245d1</id>       </form>     </task>   </tasks> </workflow> ... 

i need store xml in workflowxml field. workflowxml filed of workflow sql server table. need value of attributes using entityframework in web application.the first format less volume. second format has better structure.

it helpful if explain method better.

thanks.

one advantage of attribute oriented storage each value belongs given element , cannot exist twice.

if humans' readability of importance, second format might easier read (you call better structure), - honest - should not bother you. xml - in cases - read machine. attributes closely bound elements.

as data generated, should not have bother (possible) duplication of sub-element either, might break data.

so, final statement somehow personal taste. i'd prefer attributes


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -