L
liu
I just started using XML. I have 2 basic questions:
1) What is the benefit of using attribute compared to include the
content in another item under the element?
For example, I have numbers for different entries of elements.
I can have:
<element1>
<no>1</no>
<data1>text here</data1>
<data2>text here</data2>
</element1>
Or, I can have:
<element1 no = '1'>
<data1>text here</data1>
<data2>text here</data2>
</element1>
How do I decide choosing one over the other?
Also I have data spread over multiple lines. Is it OK to just spread it
over multiple lines. Will ASP have problem parsing the data?
for example:
<data3>
Fetal Ventricles: Normal
Fetal Cerebellum: Normal
Fetal Cranium: Normal
</data3>
Thanks for help,
liu
1) What is the benefit of using attribute compared to include the
content in another item under the element?
For example, I have numbers for different entries of elements.
I can have:
<element1>
<no>1</no>
<data1>text here</data1>
<data2>text here</data2>
</element1>
Or, I can have:
<element1 no = '1'>
<data1>text here</data1>
<data2>text here</data2>
</element1>
How do I decide choosing one over the other?
Also I have data spread over multiple lines. Is it OK to just spread it
over multiple lines. Will ASP have problem parsing the data?
for example:
<data3>
Fetal Ventricles: Normal
Fetal Cerebellum: Normal
Fetal Cranium: Normal
</data3>
Thanks for help,
liu