Attributes are simple name/value pairs associated with an element.
They are attached to the start-tag, as shown below, but not to the end-tag:
<name nickname=”sharat”>
<first>sharat</first>
<middle></middle>
<last>lastname</last>
</name>
Attributes must have values–even if that value is just an empty string (like “”)–and those values must be in quotes.
Attributes Can Provide Meta Data that May Not be Relevant to Most Applications Dealing with Our XML
Attributes are Un-Ordered
Elements Can Be More Complex Than Attributes.
Filed under: XML | 2 Comments »