Difference between XML Elements and Attributes

In one of the documents from MS about XML ports, it is mentioned eg:

TageName = SellTo, Tagtype = Element, Sourcetype = Text

TageName = Country, Tagtype = Attribute, Sourcetype = Text

Can somebody tell me what is the dfiference between ‘Element’ and ‘Attribute’ for the field Tagtype



Do yourself a favor, go to your local bookstore and get a book about XML. I have one by MSPress called XML Step by Step. You’ll learn about what makes an XML document an XML document.

An element is an XML element, an Attribute is an attribute of the element. So you could have a customer element like this:

- Acme Rockets

or you could have it as an attribute, like this:

Thanks for your comments, I appreciate ur sincerity

In fact I bought one now, and I am going through it.




DenSter replied on Wed, Jul 1 2009 17:25

thomphl replied on Wed, Jul 1 2009 17:35

10 minutes to read the reply, run down the local book store, find the book, get back, start reading and reply. That is amazing.

Those times are so close because I split these posts away from the topic that he posted this offtopic question in. I wondered about the same thing though, because if you already read a book about XML, and you don’t know the difference between elements and attributes, it’s not a very good book.