cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Difference between element and attributes while creating data types

Former Member
0 Likes
6,349

Hi Gurus,

Please provide me the difference between element and attribute.

It would be great,if I can get some example with exact usage.

Regards,

MohanRaj

View Entire Topic
Former Member
0 Likes

Hi Mohan!

This is a philosophycal question - attributes vs. elements. Technically it will work if you do in anyhow. The difference is only logical.

you can create a DT like

<person>

<name></name>

<age></name>

</person>

but also like

<person name="myname" age="myage"/>

so, depends just on your opinion, what you like more. The truth is, it is a bit easier to process attributes in XSLT and in some programming languages. But as I said, depends only on you.

Peter