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

testing - Detect whether test has failed within fixture -

AbotX : How do you create a parallel crawler that stays on and can be added to at run time from new requests -

android - Create single AAR file from multiple modules using Gradle -