XML2
XML2
XML Attributes
• XML elements can have attributes. By the use of
attributes we can add the information about the
element.
• XML attributes enhance the properties of the
elements.
• Let us take an example of a book publisher. Here,
book is the element and publisher is the
attribute.
• <book publisher="Tata McGraw Hill"></book>
Why should we avoid XML attributes
In the example above, there will be no conflict because the two <table>
elements have different names.
Displaying XML